Language
C++
Compiler
gcc 12.3.0
Options
Warnings
Boost 1.81.0
C++2a
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.81.0-gcc-12.3.0/include -std=c++2a Exit Code:
1
Author
anonymous
over 1 year ago
C++
gcc 12.3.0
Author
anonymous
over 1 year ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.81.0-gcc-12.3.0/include -std=c++2a prog.cc: In function 'void check(const int (&)[3])':
prog.cc:8:38: error: 'param' is not a constant expression
8 | constexpr auto s1 = std::size(param); // error
| ^
prog.cc:7:18: warning: unused variable 's0' [-Wunused-variable]
7 | constexpr auto s0 = std::size(local); // ok
| ^~
prog.cc:8:18: warning: unused variable 's1' [-Wunused-variable]
8 | constexpr auto s1 = std::size(param); // error
| ^~