Skip to content

Commit

Permalink
Merge pull request #24 from tchaikov/extraneous-fmt
Browse files Browse the repository at this point in the history
do not put fmt::formatter into fmt namespace
  • Loading branch information
Yaraslaut authored Jul 17, 2024
2 parents 23bbb75 + e28b094 commit 6bb4da2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/boxed-cpp/boxed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,16 @@ struct hash<boxed::detail::boxed<T, U>>
#include <fmt/format.h>
// clang-format on

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)
auto format(boxed::detail::boxed<Type, Tag> const& val, fmt::format_context& ctx) const
{
return fmt::format_to(ctx.out(), "{}", val.value);
}
};

} // namespace fmt
#endif
// }}}

0 comments on commit 6bb4da2

Please sign in to comment.