diff options
Diffstat (limited to 'redfish-core/include/utils/json_utils.hpp')
-rw-r--r-- | redfish-core/include/utils/json_utils.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp index 5b4ad9a545..f4e5385566 100644 --- a/redfish-core/include/utils/json_utils.hpp +++ b/redfish-core/include/utils/json_utils.hpp @@ -32,6 +32,7 @@ #include <limits> #include <map> #include <optional> +#include <ranges> #include <span> #include <string> #include <string_view> @@ -670,7 +671,7 @@ struct ODataObjectLess // those whose |element[key]| is string. inline void sortJsonArrayByOData(nlohmann::json::array_t& array) { - std::sort(array.begin(), array.end(), ODataObjectLess()); + std::ranges::sort(array, ODataObjectLess()); } // Returns the estimated size of the JSON value |