Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

clang HEAD 10.0.0 (https://github.com/llvm-mirror/clang.git 65acf43270ea2894dffa0d0b292b92402f80c8cb) (https://github.com/llvm-mirror/llvm.git 2c4ca6832fa6b306ee6a7010bfb80a3f2596f824)

Options
Warnings
Boost 1.72.0
C++2a
no pedantic

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.72.0/clang-head/include -std=c++2a
prog.cc:7:20: error: constexpr variable 't2' must be initialized by a constant expression
    constexpr auto t2 = std::tuple<const int&, const int&>(a, a);
                   ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:7:20: note: reference to 'a' is not a constant expression
prog.cc:5:25: note: declared here
    constexpr const int a   = 0;
                        ^
1 error generated.
Exit Code:
1