Language
C++
Compiler
gcc 5.4.0
Options
Warnings
Boost 1.68.0
C++14(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-5.4.0/include -std=gnu++14
Exit Code:
1
Author
anonymous
over 6 years ago
C++
gcc 5.4.0
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-5.4.0/include -std=gnu++14
prog.cc: In function 'int main()':
prog.cc:18:48: error: 'c.std::array<double, 3ul>::_M_elems[0ul]' is not a constant expression
constexpr C::const_reference ref = c.at( 0 );
^
prog.cc:20:5: error: non-constant condition for static assertion
static_assert( ref == 1, "ref != 1" );
^