Fri 20 Apr 2007
It is amaising what horrorable error messages g++ is able to generate…
error: could not convert ‘((Parser*)this)->Parser::words. std::map<_Key, _Tp, _Compare, _Alloc>::find [with _Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Tp = Word*, _Compare = std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, _Alloc = std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Word*> >](((const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)((const std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)(& sval))))’ to ‘bool’
The code to reproduce it looks like
if (words.find(sval)) {...}
where words is a std::map<std::string, Word*>.
The correct code is:
if (words.find(sval) == words.end()) {...}





April 20th, 2007 at 11:53 am
I dont get a single word of it although i guess im supposed to be…
April 20th, 2007 at 12:39 pm
Well, if you would like to be supposed…
It happened while developing the Parametrisierte Datentypen in der Programmierung-software. As you don’t attend to this course - you don’t have to be supposed.
April 21st, 2007 at 7:34 pm
i see. “glück gehabt…”