Flat map all the things
In an earlier commit, entity-manager gained required dependency
on std::flat_map. This means that EM can only compile with gcc-15,
which the project only recently moved to. Rather than move backwards,
port forward all uses of boost flat_map and flat_set to their std
equivalents.
Tested: entity-manager launches and enumerates devices on
gb200-obmc.
Change-Id: Id24803057711c60d5b00f436db80b27edbb756a3
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/src/utils.hpp b/src/utils.hpp
index 368de5a..b14a620 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -3,21 +3,21 @@
#pragma once
-#include <boost/container/flat_map.hpp>
#include <nlohmann/json.hpp>
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/exception.hpp>
#include <charconv>
#include <filesystem>
+#include <flat_map>
using DBusValueVariant =
std::variant<std::string, int64_t, uint64_t, double, int32_t, uint32_t,
int16_t, uint16_t, uint8_t, bool, std::vector<uint8_t>>;
-using DBusInterface = boost::container::flat_map<std::string, DBusValueVariant>;
-using DBusObject = boost::container::flat_map<std::string, DBusInterface>;
+using DBusInterface = std::flat_map<std::string, DBusValueVariant, std::less<>>;
+using DBusObject = std::flat_map<std::string, DBusInterface, std::less<>>;
using MapperGetSubTreeResponse =
- boost::container::flat_map<std::string, DBusObject>;
+ std::flat_map<std::string, DBusObject, std::less<>>;
using FirstIndex = size_t;
using LastIndex = size_t;
@@ -28,9 +28,8 @@
const std::string& matchString,
std::vector<std::filesystem::path>& foundPaths);
-bool getI2cDevicePaths(
- const std::filesystem::path& dirPath,
- boost::container::flat_map<size_t, std::filesystem::path>& busPaths);
+bool getI2cDevicePaths(const std::filesystem::path& dirPath,
+ std::flat_map<size_t, std::filesystem::path>& busPaths);
struct DBusInternalError final : public sdbusplus::exception_t
{