Skip to content

Commit

Permalink
Add parse into custom formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaraslaut committed Jun 6, 2024
1 parent 4dffb78 commit 336b35f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/boxed-cpp/boxed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ namespace fmt
template <typename Type, typename Tag>
struct fmt::formatter<boxed::detail::boxed<Type, Tag>>
{
constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); }

auto format(boxed::detail::boxed<Type, Tag> const& val, fmt::format_context& ctx)
{
return fmt::format_to(ctx.out(), "{}", val.value);
Expand Down

0 comments on commit 336b35f

Please sign in to comment.