Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc HEAD 9.0.1 20190209 (experimental)

Options
Warnings
Boost 1.69.0
C++17
no pedantic

Author

anonymous

over 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
prog.cc: In function 'int main()':
prog.cc:29:9: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'Proxy')
   29 |     s = proxy;             // Assignment, this line fails to compile <<<<<
      |         ^~~~~
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/string:55,
                 from /opt/wandbox/gcc-head/include/c++/9.0.1/bits/locale_classes.h:40,
                 from /opt/wandbox/gcc-head/include/c++/9.0.1/bits/ios_base.h:41,
                 from /opt/wandbox/gcc-head/include/c++/9.0.1/ios:42,
                 from /opt/wandbox/gcc-head/include/c++/9.0.1/ostream:38,
                 from /opt/wandbox/gcc-head/include/c++/9.0.1/iostream:39,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.1/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)
      |       ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/basic_string.h:704:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  704 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/basic_string.h:715:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  715 |       operator=(_CharT __c)
      |       ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/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)
      |       ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/basic_string.h:795:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  795 |       operator=(initializer_list<_CharT> __l)
      |       ^~~~~~~~
Exit Code:
1