diff --git a/src/json.hpp b/src/json.hpp index 9d9cab32..0fa57b1c 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -300,7 +300,7 @@ class basic_json */ friend bool operator<(const value_t lhs, const value_t rhs) { - std::array order = {{ + static constexpr std::array order = {{ 0, // null 3, // object 4, // array diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 4c666d92..003017de 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -300,7 +300,7 @@ class basic_json */ friend bool operator<(const value_t lhs, const value_t rhs) { - std::array order = {{ + static constexpr std::array order = {{ 0, // null 3, // object 4, // array