@@ -24368,15 +24368,23 @@ inline namespace json_literals
2436824368/// @brief user-defined string literal for JSON values
2436924369/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/
2437024370JSON_HEDLEY_NON_NULL(1)
24371- inline nlohmann::json operator "" _json(const char* s, std::size_t n)
24371+ #if !defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)
24372+ inline nlohmann::json operator ""_json(const char* s, std::size_t n)
24373+ #else
24374+ inline nlohmann::json operator "" _json(const char* s, std::size_t n)
24375+ #endif
2437224376{
2437324377 return nlohmann::json::parse(s, s + n);
2437424378}
2437524379
2437624380/// @brief user-defined string literal for JSON pointer
2437724381/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/
2437824382JSON_HEDLEY_NON_NULL(1)
24379- inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n)
24383+ #if !defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)
24384+ inline nlohmann::json::json_pointer operator ""_json_pointer(const char* s, std::size_t n)
24385+ #else
24386+ inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n)
24387+ #endif
2438024388{
2438124389 return nlohmann::json::json_pointer(std::string(s, n));
2438224390}
@@ -24440,8 +24448,13 @@ inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC
2444024448} // namespace std
2444124449
2444224450#if JSON_USE_GLOBAL_UDLS
24443- using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24444- using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24451+ #if !defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)
24452+ using nlohmann::literals::json_literals::operator ""_json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24453+ using nlohmann::literals::json_literals::operator ""_json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24454+ #else
24455+ using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24456+ using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24457+ #endif
2444524458#endif
2444624459
2444724460// #include <nlohmann/detail/macro_unscope.hpp>
0 commit comments