Control: tags -1 help

Hi,

any hint how to deal with


...
g++ -DHAVE_CONFIG_H -I. -I..  -I../src -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -Wextra -Wformat-nonliteral -Wformat-security 
-Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG 
-g -O1 -DDEBUG -g -O1 -c -o test_text_reader.o test_text_reader.cpp
test_text_reader.cpp: In function 'int main()':
test_text_reader.cpp:48:9: error: ambiguous overload for 'operator=' (operand 
types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 
'TextLineReader')
   48 |  line = reader ; //second line - with implicit conversion to std::string
      |         ^~~~~~
In file included from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from test_text_reader.cpp:19:
/usr/include/c++/9/bits/basic_string.h:665:7: note: candidate: 
'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& 
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const 
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; 
_Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  665 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/9/bits/basic_string.h:732:7: note: candidate: 
'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& 
std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with 
_CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  732 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
make[3]: *** [Makefile:781: test_text_reader.o] Error 1


Kind regards

      Andreas.


-- 
http://fam-tille.de

Reply via email to