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/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 9ef45e7..195bc07 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -29,6 +29,7 @@
#include <boost/url/url_view.hpp>
#include <array>
+#include <ranges>
#include <string_view>
namespace redfish
@@ -608,9 +609,9 @@
// Pack secret
auto secret = credentials.pack(
[](const auto& user, const auto& pass, auto& buff) {
- std::copy(user.begin(), user.end(), std::back_inserter(buff));
+ std::ranges::copy(user, std::back_inserter(buff));
buff.push_back('\0');
- std::copy(pass.begin(), pass.end(), std::back_inserter(buff));
+ std::ranges::copy(pass, std::back_inserter(buff));
buff.push_back('\0');
});