
Agustín K-ballo Bergé wrote:
On 1/15/2015 11:34 AM, Peter Dimov wrote:
Ion Gaztañaga wrote:
In any case with my alternative implementation you could avoid even Boost.PP for manteinance and avoid all those overloads.
My first thought when looking at is_function was also to suggest "is_convertible
", but then I saw that Ion has already got to it first, complete with the nullptr_t check. This doesn't quite work as `void() const`, and any other combination of cv and ref qualifiers, is a function type but cannot be instantiated.
You're right. The current PP-based implementation doesn't catch those either, though. Fortunately, if a compiler supports 'void () const &&', it probably has std::is_function as well, so we can just use that. :-) Although, now that I think of it, creating 'void() const' is in principle possible in C++03 as well. Not sure what the old type traits did with such types.