cppcc 0.0.6:
g++ -DHAVE_CONFIG_H -I. -I. -I.. -O3 -pipe -ansi
-D__STL_USE_STD_ALLOCATORS -c -o lex_yacc_parser.o
`test -f 'lex_yacc_parser.cc' || echo './'`lex_yacc_parser.cc
lex_yacc_parser.cc: In member function `virtual bool
LexYaccParser::parse(PropRegistry&, ITokenSpec&,
IScannerSpec&,
IParserSpec&)':
lex_yacc_parser.cc:116: error: ambiguous overload for
'operator=' in 'fileName
= (+registry)->PropRegistry::operator[](const
std::string&)((&string("input_file",
(&allocator<char>()))))'
/usr/include/g++/bits/basic_string.h:358: error: candidates
are:
std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT,
_Traits, _Alloc>::operator=(const
std::basic_string<_CharT, _Traits,
_Alloc>&) [with _CharT = char, _Traits =
std::char_traits<char>, _Alloc =
std::allocator<char>]
/usr/include/g++/bits/basic_string.h:361: error:
std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT,
_Traits, _Alloc>::operator=(const _CharT*) [with _CharT
= char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]
<near match>
/usr/include/g++/bits/basic_string.h:364: error:
std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT,
_Traits, _Alloc>::operator=(_CharT) [with _CharT =
char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]
make[3]: *** [lex_yacc_parser.o] Error 1
make[3]: Leaving directory `/home/stephan/src/
cppcc-0.0.6/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/stephan/src/
cppcc-0.0.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/stephan/src/
cppcc-0.0.6'
make: *** [all] Error 2
stephan@cheyenne:~/src/cppcc-0.0.6> gcc --version
gcc (GCC) 3.3.1 (SuSE Linux)
Logged In: YES
user_id=32742
PS: changing line 116 to the following allows it to compile:
fileName = std::string( registry["input_file"] );
The only change is the addition of the std::string() wrapper
around registry["input_file"].