Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 3 years ago

Language

C++

Compiler

clang HEAD 13.0.0 (https://github.com/llvm/llvm-project.git c4ed142e695f14ba5675ec6d12226ee706329a0f)

Options
Warnings
Boost 1.73.0
C++14
no pedantic

Author

anonymous

over 3 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/clang-head/include -std=c++14
prog.cc:32:19: error: constexpr variable 'x3' must be initialized by a constant expression
  constexpr void* x3 = voidify3(from);
                  ^    ~~~~~~~~~~~~~~
prog.cc:22:16: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
  Bar* from2 = (Bar*)&from;
               ^
prog.cc:32:24: note: in call to 'voidify3(from)'
  constexpr void* x3 = voidify3(from);
                       ^
1 error generated.
Exit Code:
1