Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 4 years ago

Language

C++

Compiler

gcc HEAD 11.0.0 20210215 (experimental)

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

Author

anonymous

over 4 years ago

$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:5:32: error: no matching function for call to 'std::exception::exception(<brace-enclosed initializer list>)'
    5 |     throw std::exception{"boom"};
      |                                ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/exception:38,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/exception.h:68:5: note: candidate: 'constexpr std::exception::exception(std::exception&&)'
   68 |     exception(exception&&) = default;
      |     ^~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/exception.h:68:15: note:   no known conversion for argument 1 from 'const char [5]' to 'std::exception&&'
   68 |     exception(exception&&) = default;
      |               ^~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/exception.h:66:5: note: candidate: 'constexpr std::exception::exception(const std::exception&)'
   66 |     exception(const exception&) = default;
      |     ^~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/exception.h:66:15: note:   no known conversion for argument 1 from 'const char [5]' to 'const std::exception&'
   66 |     exception(const exception&) = default;
      |               ^~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/exception.h:63:5: note: candidate: 'std::exception::exception()'
   63 |     exception() _GLIBCXX_NOTHROW { }
      |     ^~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/exception.h:63:5: note:   candidate expects 0 arguments, 1 provided
Exit Code:
1