format: do not use udl_{arg,formatter} return types when UDL is not in use

The udl_{arg,formatter} structs are only defined when
FMT_USE_USER_DEFINED_LITERALS is set, so don't try to define things that
return that struct when it's not defined.
This commit is contained in:
Jason A. Donenfeld 2021-06-22 14:34:33 +02:00 committed by Victor Zverovich
parent 3bd806f12f
commit c9a10631cb

View File

@ -2730,6 +2730,8 @@ extern template auto snprintf_float<long double>(long double value,
#endif // FMT_HEADER_ONLY
FMT_END_DETAIL_NAMESPACE
#if FMT_USE_USER_DEFINED_LITERALS
inline namespace literals {
/**
\rst
@ -2769,6 +2771,7 @@ constexpr auto operator"" _format(const char* s, size_t n)
return {{s, n}};
}
} // namespace literals
#endif // FMT_USE_USER_DEFINED_LITERALS
template <typename Locale, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
inline auto vformat(const Locale& loc, string_view fmt, format_args args)