Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C++

Compiler

gcc HEAD 9.0.1 20190328 (experimental)

Options
Warnings
Boost 1.69.0
C++2a(GNU)
no pedantic

Author

anonymous

about 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:15:25: error: no match for 'operator<<' (operand types are 'ostream' and '<unresolved overloaded function type>')
   15 |     cc << "hello world" << std::endl;
      |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
prog.cc:6:14: note: candidate: 'template<class T> ostream& ostream::operator<<(T&&)'
    6 |     ostream &operator <<(T &&arg){
      |              ^~~~~~~~
prog.cc:6:14: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   couldn't deduce template parameter 'T'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/bits/basic_string.h:48,
                 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/string_view:575:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::basic_string_view<_CharT, _Traits>) [with _CharT = char; _Traits = std::char_traits<char>]'
  575 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/string_view:576:43: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'std::basic_string_view<char>'
  576 |         basic_string_view<_CharT,_Traits> __str)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
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:6412:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 6412 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/basic_string.h:6412:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   couldn't deduce template parameter '_Alloc'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/bits/ios_base.h:46,
                 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/system_error:217:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)'
  217 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/system_error:217:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'const std::error_code&'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:506:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT) [with _CharT = char; _Traits = std::char_traits<char>]'
  506 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:506:62: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'char'
  506 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |                                                       ~~~~~~~^~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:511:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)'
  511 |     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:511:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'char'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:517:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)'
  517 |     operator<<(basic_ostream<char, _Traits>& __out, char __c)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:517:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'char'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:523:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)'
  523 |     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:523:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'signed char'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:528:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)'
  528 |     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:528:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'unsigned char'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:548:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>]'
  548 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:548:69: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const char*'
  548 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      |                                                       ~~~~~~~~~~~~~~^~~
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/ostream:702,
                 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/ostream.tcc:321:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)'
  321 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'const char*'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:565:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)'
  565 |     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:565:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'const char*'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:578:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)'
  578 |     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:578:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'const signed char*'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:583:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)'
  583 |     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:583:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   cannot convert 'std::endl' (type '<unresolved overloaded function type>') to type 'const unsigned char*'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
In file included 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/ostream:691:5: note: candidate: 'template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)'
  691 |     operator<<(_Ostream&& __os, const _Tp& __x)
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/9.0.1/ostream:691:5: note:   template argument deduction/substitution failed:
prog.cc:15:33: note:   couldn't deduce template parameter '_Tp'
   15 |     cc << "hello world" << std::endl;
      |                                 ^~~~
Exit Code:
1