Simplify more
This commit is contained in:
parent
c010b42d07
commit
17024c259f
@ -1368,33 +1368,17 @@ template <typename Context> struct arg_mapper {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T,
|
|
||||||
FMT_ENABLE_IF(
|
|
||||||
std::is_function<typename std::remove_pointer<T>::type>::value)>
|
|
||||||
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, FMT_ENABLE_IF(std::is_member_object_pointer<T>::value)>
|
|
||||||
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T,
|
|
||||||
FMT_ENABLE_IF(std::is_member_function_pointer<T>::value)>
|
|
||||||
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
// We use SFINAE instead of a const T* parameter to avoid conflicting with
|
// We use SFINAE instead of a const T* parameter to avoid conflicting with
|
||||||
// the C array overload.
|
// the C array overload.
|
||||||
|
|
||||||
template <
|
template <
|
||||||
typename T,
|
typename T,
|
||||||
FMT_ENABLE_IF(
|
FMT_ENABLE_IF(
|
||||||
!std::is_function<typename std::remove_pointer<T>::type>::value &&
|
std::is_member_object_pointer<T>::value ||
|
||||||
std::is_convertible<const T&, const void*>::value &&
|
std::is_member_function_pointer<T>::value ||
|
||||||
!std::is_convertible<const T&, const char_type*>::value)>
|
std::is_function<typename std::remove_pointer<T>::type>::value ||
|
||||||
|
(std::is_convertible<const T&, const void*>::value &&
|
||||||
|
!std::is_convertible<const T&, const char_type*>::value))>
|
||||||
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
|
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user