[PATCH] [libc++] Fix PR20084 - std::is_function<void() const> failed.

Eric Fiselier eric at efcs.ca
Tue Feb 17 09:44:34 PST 2015

In http://reviews.llvm.org/D7573#124869, @mclow.lists wrote:

> There are 12 different qualifiers that can go on functions.
>   const
>   volatile
>   &
>   &&
> Since `&` and `&&` are mutually exclusive, that leaves 12 different possibilities.
>  I only see tests for four here.

`TEST_REGULAR(...)` Should test all of the non-reference qualified possibilities. 
`TEST_REF_QUALIFIED(...)` Should test all of the reference qualified ones.

What am I missing?

> I'd love a `remove_qualifiers` type trait that took a function type and returned the unqualified type. That would be useful in several places; but the only way I've figured out how to do it involves tons of specializations (and even more for the non-variadic compilers).

I agree, I'll see what I can do but I don't think that should hold this up.



More information about the cfe-commits mailing list