https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91371

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The problem is not with bind and bind_front, it's that std::is_function doesn't
recognize such a function, and so std::decay doesn't know what to do with it:

#include <functional>
int bar(int) __attribute__((ms_abi)); //same with fastcall, thiscall
static_assert(std::is_function<decltype(bar)>::value, "");
static_assert(std::is_pointer<std::decay_t<decltype(bar)>>::value, "");

Libstdc++ specializes std::is_function for every type of function, but doesn't
handle alternative calling conventions. Libc++ uses a completely different
approach which detects functions by testing whether it's a non-class type that
supports implicit conversion from T& to T* (which is only true for functions).

Reply via email to