Skip to content

Commit 96a8f62

Browse files
authored
fix: remove unused to_string_view overload in fmt >= 11.1 (#3314)
1 parent 7f8060d commit 96a8f62

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

include/spdlog/common.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -364,19 +364,7 @@ SPDLOG_CONSTEXPR_FUNC spdlog::wstring_view_t to_string_view(spdlog::wstring_view
364364
}
365365
#endif
366366

367-
#ifndef SPDLOG_USE_STD_FORMAT
368-
#if FMT_VERSION >= 110100
369-
template <typename T, typename... Args>
370-
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_arg<T> fmt) {
371-
return fmt;
372-
}
373-
#else
374-
template <typename T, typename... Args>
375-
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
376-
return fmt;
377-
}
378-
#endif
379-
#elif __cpp_lib_format >= 202207L
367+
#if defined(SPDLOG_USE_STD_FORMAT) && __cpp_lib_format >= 202207L
380368
template <typename T, typename... Args>
381369
SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view(
382370
std::basic_format_string<T, Args...> fmt) SPDLOG_NOEXCEPT {

0 commit comments

Comments
 (0)