Compiling Error C2784, C2676 using STL
From: maersa (masa_iwasa_at_hotmail.com)
Date: 01/23/05
- Previous message: Tom Widmer: "Re: Bug in MSVC 7.1 hash_set::erase documentation?"
- Next in thread: Arnaud Debaene: "Re: Compiling Error C2784, C2676 using STL"
- Reply: Arnaud Debaene: "Re: Compiling Error C2784, C2676 using STL"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 23 Jan 2005 09:02:46 +0800
hi all,
i'm getting an error when trying to insert items into a map.
// define types....
typedef std::basic_string< TCHAR > tstring;
typedef std::map< tstring, tstring> STRINGMAP;
typedef std::pair< tstring, tstring > StringPair;
class A
{
.....
STRINGMAP m_properties;
.....
}
in my code i do the following....
m_properties.insert( StringPair( _T("key"), _T("value") ) );
and get the following errrors.
-----------------------------------------------------------------------------------------------------------------
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2784: 'bool std::operator <(const
std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce
template argument for 'const std::_Tree<_Traits> &' from 'const tstring'
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2784: 'bool std::operator <(const
std::list<_Ty,_Alloc> &,const std::list<_Ty,_Alloc> &)' : could not deduce
template argument for 'const std::list<_Ty,_Ax> &' from 'const tstring'
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2784: 'bool std::operator <(const
std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt> &)' :
could not deduce template argument for 'const std::reverse_iterator<_RanIt>
&' from 'const tstring'
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2784: 'bool std::operator <(const
std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce
template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const tstring'
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2676: binary '<' : 'const tstring'
does not define this operator or a conversion to a type acceptable to the
predefined operator
-----------------------------------------------------------------------------------------------------------------
thanks in advance.
- Previous message: Tom Widmer: "Re: Bug in MSVC 7.1 hash_set::erase documentation?"
- Next in thread: Arnaud Debaene: "Re: Compiling Error C2784, C2676 using STL"
- Reply: Arnaud Debaene: "Re: Compiling Error C2784, C2676 using STL"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|