Use ranges
C++20 brought us std::ranges for a lot of algorithms. Most of these
conversions were done using comby, similar to:
```
comby -verbose 'std::lower_bound(:[a].begin(),:[b].end(),:[c])' 'std::ranges::lower_bound(:[a], :[c])' $(git ls-files | grep "\.[hc]\(pp\)\?$") -in-place
```
Change-Id: I0c99c04e9368312555c08147d474ca93a5959e8d
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 6211fcc..7c47bcc 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -56,6 +56,7 @@
#include <limits>
#include <map>
#include <memory>
+#include <ranges>
#include <regex>
#include <string>
#include <string_view>
@@ -2443,7 +2444,7 @@
}
else
{
- std::sort(names.begin(), names.end());
+ std::ranges::sort(names);
asyncResp->res.jsonValue["status"] = "ok";
auto& objectsSub = asyncResp->res.jsonValue["objects"];
for (const auto& name : names)