replace FormatString template argument with fmt::basic_format_string

This commit is contained in:
dkavolis
2021-07-22 16:19:48 +01:00
parent 0f39da5490
commit d8f13cbd5b
5 changed files with 154 additions and 47 deletions

View File

@@ -123,13 +123,24 @@ using wmemory_buf_t = fmt::basic_memory_buffer<wchar_t, 250>;
template<typename T>
struct is_convertible_to_wstring_view : std::is_convertible<T, wstring_view_t>
{};
template<class T>
struct is_convertible_to_wformat_string : std::is_convertible<T, fmt::wformat_string<>>
{};
# endif // _WIN32
#else
template<typename>
struct is_convertible_to_wstring_view : std::false_type
{};
template<class>
struct is_convertible_to_wformat_string : std::false_type
{};
#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT
template<class T>
struct is_convertible_to_basic_format_string
: std::integral_constant<bool, std::is_convertible<const T &, fmt::format_string<>>::value || is_convertible_to_wformat_string<T>::value>
{};
#if defined(SPDLOG_NO_ATOMIC_LEVELS)
using level_t = details::null_atomic_int;
#else