Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 3 years ago

Language

C++

Compiler

gcc HEAD 12.0.0 20210721 (experimental)

Options
Warnings
Don't Use Boost
C++17
-pedantic-errors

Author

anonymous

over 3 years ago

$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors
prog.cc: In function 'int main()':
prog.cc:6:43: error: taking address of temporary array
    6 |     static_assert(std::is_same<decltype(0[intarr{0}]), int&&>::value, "");
      |                                           ^~~~~~~~~
prog.cc:6:43: error: taking address of temporary array
prog.cc:6:61: error: template argument 1 is invalid
    6 |     static_assert(std::is_same<decltype(0[intarr{0}]), int&&>::value, "");
      |                                                             ^
Exit Code:
1