fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void may() noexcept(throw std::logic_error())
  5. {
  6. cout << "nnn";
  7. }
  8.  
  9. int main() {
  10.  
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 4352KB
stdin
Standard input is empty
compilation info
prog.cpp:4:44: error: no matching function for call to ‘std::logic_error::logic_error()’
 void may() noexcept(throw std::logic_error())
                                            ^
In file included from /usr/include/c++/6/system_error:41:0,
                 from /usr/include/c++/6/bits/ios_base.h:46,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/6/stdexcept:128:5: note: candidate: std::logic_error::logic_error(const std::logic_error&)
     logic_error(const logic_error&) _GLIBCXX_USE_NOEXCEPT;
     ^~~~~~~~~~~
/usr/include/c++/6/stdexcept:128:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/6/stdexcept:124:5: note: candidate: std::logic_error::logic_error(const char*)
     logic_error(const char*) _GLIBCXX_TXN_SAFE;
     ^~~~~~~~~~~
/usr/include/c++/6/stdexcept:124:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/6/stdexcept:120:5: note: candidate: std::logic_error::logic_error(const string&)
     logic_error(const string& __arg) _GLIBCXX_TXN_SAFE;
     ^~~~~~~~~~~
/usr/include/c++/6/stdexcept:120:5: note:   candidate expects 1 argument, 0 provided
stdout
Standard output is empty