mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-13 00:40:51 +00:00
Move format_string to fmt namespace for ADL
This commit is contained in:
parent
2768af2388
commit
fe19c266ce
@ -1229,6 +1229,8 @@ FMT_CONSTEXPR unsigned basic_parse_context<Char, ErrorHandler>::next_arg_id() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct format_string {};
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <typename Char, typename Handler>
|
template <typename Char, typename Handler>
|
||||||
@ -1525,8 +1527,6 @@ class arg_formatter_base {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct format_string {};
|
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
struct is_format_string:
|
struct is_format_string:
|
||||||
std::integral_constant<bool, std::is_base_of<format_string, S>::value> {};
|
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
|
#endif // FMT_USE_USER_DEFINED_LITERALS
|
||||||
|
|
||||||
#define FMT_STRING(s) [] { \
|
#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 auto data() { return s; } \
|
||||||
static FMT_CONSTEXPR size_t size() { return sizeof(s); } \
|
static FMT_CONSTEXPR size_t size() { return sizeof(s); } \
|
||||||
}; \
|
}; \
|
||||||
|
Loading…
Reference in New Issue
Block a user