Detect types convertible to unformattable pointers
This commit is contained in:
@@ -1370,8 +1370,11 @@ template <typename Context> struct arg_mapper {
|
||||
|
||||
// We use SFINAE instead of a const T* parameter to avoid conflicting with
|
||||
// the C array overload.
|
||||
template <typename T, FMT_ENABLE_IF(std::is_pointer<T>::value)>
|
||||
FMT_CONSTEXPR auto map(T) -> unformattable_pointer {
|
||||
template <
|
||||
typename T,
|
||||
FMT_ENABLE_IF(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 {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user