Skip to content

Commit

Permalink
Provide a fmtlib ostream formatter for SysPwrMode enum
Browse files Browse the repository at this point in the history
fmtlib removed support for automatically formatting enums as integers
in version 9. See fmtlib/fmt#1841.

Signed-off-by: Eddie James <[email protected]>
Change-Id: I6a5d04187e55c94d39d8b5ee334f9a37c93081ce
  • Loading branch information
Eddie James committed Nov 8, 2022
1 parent 2ccc3f6 commit b251546
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions occ_command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "occ_errors.hpp"
#include "utils.hpp"

#include <fmt/ostream.h>

#include <org/open_power/OCC/PassThrough/server.hpp>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
Expand Down Expand Up @@ -171,3 +173,7 @@ class OccCommand

} // namespace occ
} // namespace open_power

template <>
struct fmt::formatter<open_power::occ::SysPwrMode> : ostream_formatter
{};

0 comments on commit b251546

Please sign in to comment.