Skip to content

Commit

Permalink
Merge pull request #21 from contour-terminal/fix/custom_formatter
Browse files Browse the repository at this point in the history
Add parse into custom formatter
  • Loading branch information
Yaraslaut authored Jun 10, 2024
2 parents 4dffb78 + 7092393 commit 23bbb75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ indent_size = 2

[*.yml]
indent_size = 2

[*.md]
indent_size = 2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ template <typename Func, typename... Tuple> struct Wrap_with_tuple {
template <typename call_tuple, typename T, T... ints>
decltype(auto) make_call(call_tuple arg_tuple,
std::integer_sequence<T, ints...> int_seq) {
std::integer_sequence<T, ints...> int_seq) {
return _func(
std::get<std::decay_t<decltype(std::get<ints>(_order))>>(arg_tuple)...);
}
Expand Down
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 23bbb75

Please sign in to comment.