Move format_string to fmt namespace for ADL

This commit is contained in:
Victor Zverovich 2018-04-29 08:35:20 -07:00
parent 2768af2388
commit fe19c266ce

View File

@ -1229,6 +1229,8 @@ FMT_CONSTEXPR unsigned basic_parse_context<Char, ErrorHandler>::next_arg_id() {
return 0;
}
struct format_string {};
namespace internal {
template <typename Char, typename Handler>
@ -1525,8 +1527,6 @@ class arg_formatter_base {
}
};
struct format_string {};
template <typename S>
struct is_format_string:
std::integral_constant<bool, std::is_base_of<format_string, S>::value> {};
@ -3567,7 +3567,7 @@ operator"" _a(const wchar_t *s, std::size_t) { return {s}; }
#endif // FMT_USE_USER_DEFINED_LITERALS
#define FMT_STRING(s) [] { \
struct S : fmt::internal::format_string { \
struct S : fmt::format_string { \
static FMT_CONSTEXPR auto data() { return s; } \
static FMT_CONSTEXPR size_t size() { return sizeof(s); } \
}; \