Skip to content

Commit

Permalink
Added formatting for variant-like types
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Čukić <[email protected]>
  • Loading branch information
ivan-cukic authored and RalphSteinhagen committed Nov 25, 2024
1 parent 5f5b949 commit 5070227
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meta/include/gnuradio-4.0/meta/formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ struct fmt::formatter<T> { // alternate pmtv formatter optimised for compile-tim
}
}
return fmt::format_to(ctx.out(), " }}");
} else if constexpr (requires { std::visit([](const auto&) {}, arg); }) {
return std::visit([&](const auto& value) { return format_value(value, ctx); }, arg);
} else if constexpr (std::same_as<std::monostate, U>) {
return fmt::format_to(ctx.out(), "null");
} else {
Expand Down

0 comments on commit 5070227

Please sign in to comment.