Skip to content

Commit fe2f8bb

Browse files
committed
do not put fmt::formatter into fmt namespace
as fmt::formatter already has the namespace qualifier. otherwise, the build would fail when building with fmt 11, like: ``` /usr/include/boxed-cpp/boxed.hpp:218:8: error: extra qualification not allowed [-fpermissive] 218 | struct fmt::formatter<boxed::detail::boxed<Type, Tag>> | ^~~ In file included from /usr/include/fmt/format.h:41, from /usr/include/boxed-cpp/boxed.hpp:211: /usr/include/fmt/base.h: In instantiation of ‘static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = boxed::detail::boxed<unsigned int, vtpty::detail::tags::Width>; Formatter = fmt::v11::formatter<boxed::detail::boxed<unsigned int, vtpty::detail::tags::Width>, char, void>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]’: /usr/include/fmt/base.h:1373:19: required from ‘constexpr fmt::v11::detail::value<Context>::value(T&) [with T = boxed::detail::boxed<unsigned int, vtpty::detail::tags::Width>; Context = fmt::v11::context]’ 1373 | custom.format = format_custom_arg< | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ 1374 | value_type, typename Context::template formatter_type<value_type>>; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/fmt/base.h:1631:41: required from ‘constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {boxed::detail::boxed<unsigned int, vtpty::detail::tags::Width>, boxed::detail::boxed<unsigned int, vtpty::detail::tags::Height>}; long unsigned int NUM_ARGS = 2; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 255; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’ 1631 | return {arg_mapper<Context>().map(val)}; | ^ ``` Signed-off-by: Kefu Chai <[email protected]>
1 parent 23bbb75 commit fe2f8bb

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

include/boxed-cpp/boxed.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ struct hash<boxed::detail::boxed<T, U>>
212212
#include <fmt/format.h>
213213
// clang-format on
214214

215-
namespace fmt
216-
{
217-
218215
template <typename Type, typename Tag>
219216
struct fmt::formatter<boxed::detail::boxed<Type, Tag>>
220217
{
@@ -226,6 +223,5 @@ struct fmt::formatter<boxed::detail::boxed<Type, Tag>>
226223
}
227224
};
228225

229-
} // namespace fmt
230226
#endif
231227
// }}}

0 commit comments

Comments
 (0)