I'm trying to use constexpr in C++ but get the compile error: 'constexpr' was not declared in this scope.
I tried both in CodeBlocks using the GNU GCC compiler, and in Visual Studio 2013.
the code is:
#include <iostream>
int main()
{
constexpr double ft2m = 0.3048;
std::cout << ft2m;
}
What could be the problem?