![]() |
От: |
Bender Bending Rodriguez
|
|
Дата: | 02.04.10 13:04 | ||
Оценка: |
#include <vector>
#include <utility>
class A
{
public:
A(const int i):m(i){}
private:
int m;
};
int main()
{
typedef std::pair< A, std::vector< int > > pair_t;
typedef std::vector< pair_t > vector_t;
vector_t vector;
pair_t el(A(5), std::vector< int >(5, 5));
vector.push_back(el);
return 0;
}
error C2512: 'A::A' : no appropriate default constructor available
typedef std::pair< A, std::vector< int > > pair_t;
typedef std::pair< A, A > pair_t;
template<class _InIt, class _FwdIt, class _Alloc>
inline _FwdIt _Uninit_move(
{ // use swap to instead of the copy constructor
...
// empty value used in the construction
typename _Alloc::value_type _Val;
...
}