Using C++11, Ubuntu 14.04, GCC default toolchain. This code fails: constexpr std::string constString = "constString"; error: the type ‘const string {aka const std::basic_string}’ of constexpr variable ‘constString’ is not...
  • May 23, 2022
  • 0 Comments
Is there a difference between the following definitions? const double PI = 3.141592653589793; constexpr double PI = 3.141592653589793; If not, which style is preferred in C++11? 5 Answers 5
  • May 8, 2022
  • 0 Comments