mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 21:31:20 +00:00
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:
parent
3bd806f12f
commit
c9a10631cb
@ -2730,6 +2730,8 @@ extern template auto snprintf_float<long double>(long double value,
|
|||||||
#endif // FMT_HEADER_ONLY
|
#endif // FMT_HEADER_ONLY
|
||||||
|
|
||||||
FMT_END_DETAIL_NAMESPACE
|
FMT_END_DETAIL_NAMESPACE
|
||||||
|
|
||||||
|
#if FMT_USE_USER_DEFINED_LITERALS
|
||||||
inline namespace literals {
|
inline namespace literals {
|
||||||
/**
|
/**
|
||||||
\rst
|
\rst
|
||||||
@ -2769,6 +2771,7 @@ constexpr auto operator"" _format(const char* s, size_t n)
|
|||||||
return {{s, n}};
|
return {{s, n}};
|
||||||
}
|
}
|
||||||
} // namespace literals
|
} // namespace literals
|
||||||
|
#endif // FMT_USE_USER_DEFINED_LITERALS
|
||||||
|
|
||||||
template <typename Locale, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
|
template <typename Locale, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
|
||||||
inline auto vformat(const Locale& loc, string_view fmt, format_args args)
|
inline auto vformat(const Locale& loc, string_view fmt, format_args args)
|
||||||
|
Loading…
Reference in New Issue
Block a user