Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 47f7c9f1a774a48d11a686ab754f5a4b5342f5f5) (https://github.com/llvm-mirror/llvm.git b044a64d2770dbaeb9d29ae24c8edf36b3cd6fa6)

Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-head/include -std=gnu++2a
prog.cc:6:22: error: constexpr variable 'b' must be initialized by a constant expression
    constexpr double b = sqrt(a);
                     ^   ~~~~~~~
prog.cc:6:26: note: non-constexpr function 'sqrt' cannot be used in a constant expression
    constexpr double b = sqrt(a);
                         ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:156:13: note: declared here
__MATHCALL (sqrt,, (_Mdouble_ __x));
            ^
1 error generated.
Exit Code:
1