Formatting of function pointers, member function pointers, member object pointers... (#2610)

This commit is contained in:
Alex Guteniev
2021-11-23 22:55:22 +02:00
committed by GitHub
parent 19cac63fe4
commit a3ab36c803
3 changed files with 18 additions and 2 deletions

View File

@@ -1372,8 +1372,11 @@ template <typename Context> struct arg_mapper {
// the C array overload.
template <
typename T,
FMT_ENABLE_IF(std::is_convertible<const T&, const void*>::value &&
!std::is_convertible<const T&, const char_type*>::value)>
FMT_ENABLE_IF(
std::is_member_pointer<T>::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 {
return {};
}