A
Artur Bac
I got a problem with eVc4 i STLPort and i dont known why
c:\stlport-5.0.2\stlport\stl\_construct.h(115) : error C2665: 'new' :
none of
the 2 overloads can convert parameter 2 from type 'struct
ns::CPointT<short> *'
c:\stlport-5.0.2\stlport\stl\_vector.h(351) : see reference to
function
template instantiation 'void __cdecl stlp_std::_Copy_Construct(struct
ns::CPointT<short> *,const struct ns::CPointT<short> &)' being compiled
#include <vector>
#include <algorithm>
template <class T>
struct CPointT {
T x;
T y;
CPointT(){};
CPointT( T p_x, T p_y) : x(p_x), y(p_y) {};
};
typedef CPointT<SHORT> CPoint16;
std::vector<CPoint16> punkty;
vector<CPoint16> v1;
CPoint16 a(1,0);
v1.insert(v1.end(),a);
I dig into the STLPort and it fail on that
-----------------------------------------
#define _STLP_PLACEMENT_NEW new
...
template <class _Tp>
inline void _Copy_Construct(_Tp* __p, const _Tp& __val) {
_STLP_PLACEMENT_NEW (__p) _Tp(__val);
}
help
c:\stlport-5.0.2\stlport\stl\_construct.h(115) : error C2665: 'new' :
none of
the 2 overloads can convert parameter 2 from type 'struct
ns::CPointT<short> *'
c:\stlport-5.0.2\stlport\stl\_vector.h(351) : see reference to
function
template instantiation 'void __cdecl stlp_std::_Copy_Construct(struct
ns::CPointT<short> *,const struct ns::CPointT<short> &)' being compiled
#include <vector>
#include <algorithm>
template <class T>
struct CPointT {
T x;
T y;
CPointT(){};
CPointT( T p_x, T p_y) : x(p_x), y(p_y) {};
};
typedef CPointT<SHORT> CPoint16;
std::vector<CPoint16> punkty;
vector<CPoint16> v1;
CPoint16 a(1,0);
v1.insert(v1.end(),a);
I dig into the STLPort and it fail on that
-----------------------------------------
#define _STLP_PLACEMENT_NEW new
...
template <class _Tp>
inline void _Copy_Construct(_Tp* __p, const _Tp& __val) {
_STLP_PLACEMENT_NEW (__p) _Tp(__val);
}
help