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/fru_device/fru_utils.cpp b/src/fru_device/fru_utils.cpp
index efb4ec1..1efcd30 100644
--- a/src/fru_device/fru_utils.cpp
+++ b/src/fru_device/fru_utils.cpp
@@ -277,7 +277,7 @@
static void parseMultirecordUUID(
std::span<const uint8_t> device,
- boost::container::flat_map<std::string, std::string>& result)
+ std::flat_map<std::string, std::string, std::less<>>& result)
{
constexpr size_t uuidDataLen = 16;
constexpr size_t multiRecordHeaderLen = 5;
@@ -364,7 +364,7 @@
std::span<const uint8_t>::const_iterator& fruBytesIterEndArea,
const std::vector<std::string>& fruAreaFieldNames, size_t& fieldIndex,
DecodeState& state, bool isLangEng, const fruAreas& area,
- boost::container::flat_map<std::string, std::string>& result)
+ std::flat_map<std::string, std::string, std::less<>>& result)
{
auto res = decodeFRUData(fruBytesIter, fruBytesIterEndArea, isLangEng);
state = res.first;
@@ -432,7 +432,7 @@
resCodes formatIPMIFRU(
std::span<const uint8_t> fruBytes,
- boost::container::flat_map<std::string, std::string>& result)
+ std::flat_map<std::string, std::string, std::less<>>& result)
{
resCodes ret = resCodes::resOK;
if (fruBytes.size() <= fruBlockSize)
@@ -1594,9 +1594,9 @@
// regular expression and find the device index for all devices.
std::optional<int> findIndexForFRU(
- boost::container::flat_map<
- std::pair<size_t, size_t>,
- std::shared_ptr<sdbusplus::asio::dbus_interface>>& dbusInterfaceMap,
+ std::flat_map<std::pair<size_t, size_t>,
+ std::shared_ptr<sdbusplus::asio::dbus_interface>>&
+ dbusInterfaceMap,
std::string& productName)
{
int highest = -1;
@@ -1640,7 +1640,7 @@
std::optional<std::string> getProductName(
std::vector<uint8_t>& device,
- boost::container::flat_map<std::string, std::string>& formattedFRU,
+ std::flat_map<std::string, std::string, std::less<>>& formattedFRU,
uint32_t bus, uint32_t address, size_t& unknownBusObjectCount)
{
std::string productName;