コードのコンパイルに問題があります。私はこの特定のコードを持っています
typedef double Type;
static const Type MAX_VALUE = __DBL_MAX__;
static const Type MIN_VALUE = -__DBL_MAX__;
今、コンパイルしようとすると。次のエラーが表示されます
error: a call to a constructor cannot appear in a constant-expression
定義 const を constexpr に変更します。しかし、それは次のエラーを示しています
error: ‘constexpr’ does not name a type
note: C++0x ‘constexpr’ only available with -std=c++0x or -std=gnu++0x
この問題を解決するにはどうすればよいですか?