Fix handling of types with to_string_view and formatter specialization (#2180)

This commit is contained in:
Victor Zverovich
2021-03-18 10:11:06 -07:00
parent a6408a3b09
commit 6ae402fd0b
2 changed files with 46 additions and 19 deletions

View File

@@ -95,7 +95,9 @@ class dynamic_format_arg_store
};
template <typename T>
using stored_type = conditional_t<detail::is_string<T>::value,
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>;
// Storage of basic_format_arg must be contiguous.