#include <iostream> int main() { constexpr int i = 42; int j = 43; constexpr int k { j }; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:9:22: error: the value of ‘j’ is not usable in a constant expression
constexpr int k { j };
^
prog.cpp:7:6: note: ‘int j’ is not const
int j = 43;
^
Standard output is empty