Added
Link Here
|
1 |
--- include/fmt/format.h.orig 2021-06-21 12:59:15 UTC |
2 |
+++ include/fmt/format.h |
3 |
@@ -2730,6 +2730,8 @@ extern template auto snprintf_float<long double>(long |
4 |
#endif // FMT_HEADER_ONLY |
5 |
|
6 |
FMT_END_DETAIL_NAMESPACE |
7 |
+ |
8 |
+#if FMT_USE_USER_DEFINED_LITERALS |
9 |
inline namespace literals { |
10 |
/** |
11 |
\rst |
12 |
@@ -2741,18 +2743,18 @@ inline namespace literals { |
13 |
fmt::print("Elapsed time: {s:.2f} seconds", "s"_a=1.23); |
14 |
\endrst |
15 |
*/ |
16 |
-#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS |
17 |
+# if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS |
18 |
template <detail_exported::fixed_string Str> |
19 |
constexpr auto operator""_a() |
20 |
-> detail::udl_arg<remove_cvref_t<decltype(Str.data[0])>, |
21 |
sizeof(Str.data) / sizeof(decltype(Str.data[0])), Str> { |
22 |
return {}; |
23 |
} |
24 |
-#else |
25 |
+# else |
26 |
constexpr auto operator"" _a(const char* s, size_t) -> detail::udl_arg<char> { |
27 |
return {s}; |
28 |
} |
29 |
-#endif |
30 |
+# endif |
31 |
|
32 |
/** |
33 |
\rst |
34 |
@@ -2769,6 +2771,7 @@ constexpr auto operator"" _format(const char* s, size_ |
35 |
return {{s, n}}; |
36 |
} |
37 |
} // namespace literals |
38 |
+#endif // FMT_USE_USER_DEFINED_LITERALS |
39 |
|
40 |
template <typename Locale, FMT_ENABLE_IF(detail::is_locale<Locale>::value)> |
41 |
inline auto vformat(const Locale& loc, string_view fmt, format_args args) |