Language
C++
Compiler
gcc HEAD 12.0.0 20210721 (experimental)
Options
Warnings
Don't Use Boost
C++17
-pedantic-errors
$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors
Exit Code:
1
Author
anonymous
over 3 years ago
C++
gcc HEAD 12.0.0 20210721 (experimental)
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, "");
| ^