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/perform_probe.cpp b/src/entity_manager/perform_probe.cpp
index e5b57eb..94d3d21 100644
--- a/src/entity_manager/perform_probe.cpp
+++ b/src/entity_manager/perform_probe.cpp
@@ -184,7 +184,7 @@
if (ret && foundDevs.empty())
{
foundDevs.emplace_back(
- boost::container::flat_map<std::string, DBusValueVariant>{},
+ std::flat_map<std::string, DBusValueVariant, std::less<>>{},
std::string{});
}
if (matchOne && ret)
@@ -220,8 +220,7 @@
FoundProbeTypeT findProbeType(const std::string& probe)
{
- static const boost::container::flat_map<const char*, probe_type_codes,
- CmpStr>
+ static const std::flat_map<std::string_view, probe_type_codes, std::less<>>
probeTypes{{{"FALSE", probe_type_codes::FALSE_T},
{"TRUE", probe_type_codes::TRUE_T},
{"AND", probe_type_codes::AND},
@@ -229,8 +228,8 @@
{"FOUND", probe_type_codes::FOUND},
{"MATCH_ONE", probe_type_codes::MATCH_ONE}}};
- boost::container::flat_map<const char*, probe_type_codes,
- CmpStr>::const_iterator probeType;
+ std::flat_map<std::string_view, probe_type_codes,
+ std::less<>>::const_iterator probeType;
for (probeType = probeTypes.begin(); probeType != probeTypes.end();
++probeType)
{