Fix stored type detection

This commit is contained in:
Victor Zverovich 2022-02-05 10:41:18 -08:00
parent e2ba01fcb0
commit 90325d0970

View File

@ -95,10 +95,10 @@ class dynamic_format_arg_store
};
template <typename T>
using stored_type = conditional_t<detail::is_string<T>::value &&
!has_formatter<T, Context>::value &&
!detail::is_reference_wrapper<T>::value,
std::basic_string<char_type>, T>;
using stored_type = conditional_t<
std::is_convertible<T, std::basic_string<char_type>>::value &&
!detail::is_reference_wrapper<T>::value,
std::basic_string<char_type>, T>;
// Storage of basic_format_arg must be contiguous.
std::vector<basic_format_arg<Context>> data_;