Make is_formattable work with const/volatile void

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov 2024-09-04 20:05:23 +05:00 committed by Victor Zverovich
parent 6aaf7f4b79
commit 1cc10ab68f

View File

@ -2819,11 +2819,11 @@ template <typename Char, typename... T> class fstring {
template <typename... T> using format_string = typename fstring<char, T...>::t;
template <typename T, typename Char = char>
using is_formattable = bool_constant<!std::is_base_of<
detail::unformattable,
detail::mapped_t<
conditional_t<std::is_same<T, void>::value, detail::unformattable, T>,
Char>>::value>;
using is_formattable = bool_constant<
!std::is_base_of<detail::unformattable,
detail::mapped_t<conditional_t<std::is_void<T>::value,
detail::unformattable, T>,
Char>>::value>;
#ifdef __cpp_concepts
template <typename T, typename Char = char>