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/entity_manager/devices.hpp b/src/entity_manager/devices.hpp
index a2bcffa..ed0f8dc 100644
--- a/src/entity_manager/devices.hpp
+++ b/src/entity_manager/devices.hpp
@@ -2,19 +2,11 @@
// SPDX-FileCopyrightText: Copyright 2018 Intel Corporation
#pragma once
-#include <boost/container/flat_map.hpp>
+#include <flat_map>
namespace devices
{
-struct CmpStr
-{
- bool operator()(const char* a, const char* b) const
- {
- return std::strcmp(a, b) < 0;
- }
-};
-
// I2C device drivers may create a /hwmon subdirectory. For example the tmp75
// driver creates a /sys/bus/i2c/devices/<busnum>-<i2caddr>/hwmon
// directory. The sensor code relies on the presence of the /hwmon
@@ -50,7 +42,7 @@
createsHWMon hasHWMonDir;
};
-const boost::container::flat_map<const char*, ExportTemplate, CmpStr>
+const std::flat_map<std::string_view, ExportTemplate, std::less<>>
exportTemplates{
{{"EEPROM_24C01",
ExportTemplate("24c01 $Address", "/sys/bus/i2c/devices/i2c-$Bus",