Language
C++
Compiler
clang 6.0.0
Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-6.0.0/include -std=gnu++2a
Exit Code:
1
Author
anonymous
over 6 years ago
C++
clang 6.0.0
Author
anonymous
over 6 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-6.0.0/include -std=gnu++2a
prog.cc:2:15: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
constexpr int foo(int i) {
^
prog.cc:4:5: note: non-constexpr function 'operator=<int &, void>' cannot be used in a constant expression
o = i;
^
/opt/wandbox/clang-6.0.0/include/c++/v1/optional:773:5: note: declared here
operator=(_Up&& __v)
^
1 error generated.