[Solved] Why not have all variables be a constexpr? [closed]
[ad_1] First of all not all variables can be made constexpr. For example int x; std::cin >> x; Obviously x cannot be constexpr. The value it will have after it has been read from input is not a compile-time constant. Second, constexpr is part of the contract of a variable or function. By marking it … Read more