23 Apr
2003
23 Apr
'03
3:46 p.m.
John Harris
Ben Hutchings wrote:
I compiled almost the exact same code:
#include
#include <map> #include <utility> typedef std::basic_string
t; int main() { std::map
> > m; } with VC++ 7.0 and Boost 1.29, and got no warnings or errors at all.
Ah, yes, that works for me, too (no warning, either), but try adding a line of code that actually uses the map, like this:
m["abc"] = "def";
and you get the following cascade of errors: <snip>
Which all indicates that operator< is not defined for t, because we didn't include <string>. Let's not be so quick to blame the compiler. VC++ 7 is a long way ahead of version 6.