Original Post
I've recently updated my code with Stlport library, but this code snippet doesn't seem to work
#include "stdafx.h"
#include <string>
#include <vector>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string text("add me");
vector<string> strList;
strList.push_back( text );
return 0;
}
compiling this code generates this error :
c:\Program Files\Microsoft Visual Studio .NET 2003\STLport-4.6.2\stlport\stl\_list.h(243) : error C2668: 'std::_Construct' : ambiguous call to overloaded function
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xmemory(40): could be 'void std::_Construct<_Tp,_Tp>(_T1 *,const _T2 &)' [found using argument-dependent lookup]
with
[
_Tp=_STL::string,
_T1=_STL::string,
_T2=_STL::string
]
c:\Program Files\Microsoft Visual Studio .NET 2003\STLport-4.6.2\stlport\stl\_construct.h(93): or 'void _STL::_Construct<_Tp,_Tp>(_T1 *,const _T2 &)'
with
[
_Tp=_STL::string,
_T1=_STL::string,
_T2=_STL::string
]
while trying to match the argument list '(_STL::string *__w64 , const _STL::string)'
c:\Program Files\Microsoft Visual Studio .NET 2003\STLport-4.6.2\stlport\stl\_list.h(240) : while compiling class-template member function '_STL::list<_Tp>::_Node *_STL::list<_Tp>::_M_create_node(const _Tp &)'
with
[
_Tp=_STL::string
]
d:\Sepul\Dev\stltest\stltest.cpp(13) : see reference to class template instantiation '_STL::list<_Tp>' being compiled
with
[
_Tp=_STL::string
]
this error only occurs on vector<string>