diff --git a/include/fmt/format.h b/include/fmt/format.h index db618a8e..5a410390 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4093,7 +4093,7 @@ class udl_formatter { # else template struct udl_formatter { - const Char *str; + basic_string_view str; template auto operator()(Args && ... args) const @@ -4105,7 +4105,7 @@ struct udl_formatter { template struct udl_arg { - const Char *str; + basic_string_view str; template named_arg> operator=(T &&value) const { @@ -4134,9 +4134,9 @@ constexpr internal::udl_formatter operator""_format() { \endrst */ inline internal::udl_formatter -operator"" _format(const char *s, std::size_t) { return {s}; } +operator"" _format(const char *s, std::size_t n) { return {s, n}; } inline internal::udl_formatter -operator"" _format(const wchar_t *s, std::size_t) { return {s}; } +operator"" _format(const wchar_t *s, std::size_t n) { return {s, n}; } # endif // FMT_UDL_TEMPLATE /** @@ -4150,9 +4150,9 @@ operator"" _format(const wchar_t *s, std::size_t) { return {s}; } \endrst */ inline internal::udl_arg -operator"" _a(const char *s, std::size_t) { return {s}; } +operator"" _a(const char *s, std::size_t n) { return {s, n}; } inline internal::udl_arg -operator"" _a(const wchar_t *s, std::size_t) { return {s}; } +operator"" _a(const wchar_t *s, std::size_t n) { return {s, n}; } } // inline namespace literals } // namespace fmt #endif // FMT_USE_USER_DEFINED_LITERALS