Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc HEAD 14.0.0 20231230 (experimental)

Options
Warnings
Don't Use Boost
C++2b(GNU)
no pedantic

$ g++ prog.cc -Wall -Wextra -std=gnu++2b
prog.cc: In instantiation of 'void foo() [with T = int]':
prog.cc:28:17:   required from here
   28 |         foo<int>(); // noexcept(sizeof(T)<8) => noexcept(true),
      |         ~~~~~~~~^~
prog.cc:8:5: warning: 'throw' will always call 'terminate' [-Wterminate]
    8 |     throw 10;
      |     ^~~~~~~~
calling bar()
calling foo<int()
terminate called after throwing an instance of 'int'
Signal:
Aborted