constexpr double square(double x) { return x*x; }
12
int var = 17; constexpr double max2 = 1.4*square(var);
1234567
$ g++ -std=c++11 main.cpp main.cpp:10:39: error: the value of ‘var’ is not usable in a constant expression constexpr double max2 = 1.4*square(var); ^ main.cpp:9:5: note: ‘int var’ is not const int var = 17; ^