fix: update to_string_view function for fmt 11.1

Signed-off-by: Rui Chen <rui@chenrui.dev>
pull/3301/head
Rui Chen 8 months ago
parent 24dde318fe
commit e693420a38
No known key found for this signature in database
GPG Key ID: 6577287BDCA70840

@ -365,10 +365,17 @@ SPDLOG_CONSTEXPR_FUNC spdlog::wstring_view_t to_string_view(spdlog::wstring_view
#endif #endif
#ifndef SPDLOG_USE_STD_FORMAT #ifndef SPDLOG_USE_STD_FORMAT
#if FMT_VERSION >= 110100
template <typename T, typename... Args>
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_arg<T> fmt) {
return fmt;
}
#else
template <typename T, typename... Args> template <typename T, typename... Args>
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) { inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
return fmt; return fmt;
} }
#endif
#elif __cpp_lib_format >= 202207L #elif __cpp_lib_format >= 202207L
template <typename T, typename... Args> template <typename T, typename... Args>
SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view( SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view(

Loading…
Cancel
Save