From c817e0ee801dc1097a02a995aed291fdd7bf332a Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Tue, 2 Jun 2015 11:25:31 +0200 Subject: [PATCH 1/2] Make non-mutable array static and constexpr --- src/json.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json.hpp b/src/json.hpp index b357a70fb..2f0c8d5c9 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 From d45fa405754673b5cae5dc20b74ab276f10cd838 Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Tue, 2 Jun 2015 12:47:16 +0200 Subject: [PATCH 2/2] Modify the original source file, not the result of the re2c tool --- src/json.hpp | 2 +- src/json.hpp.re2c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 2f0c8d5c9..b357a70fb 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) { - static constexpr std::array order = {{ + std::array order = {{ 0, // null 3, // object 4, // array diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index c10a9cc6d..f25ecb075 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