Skip to content

Commit

Permalink
Move format_string to fmt namespace for ADL
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Apr 29, 2018
1 parent 2768af2 commit fe19c26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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> {};
Expand Down Expand Up @@ -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); } \
}; \
Expand Down

0 comments on commit fe19c26

Please sign in to comment.