Fix is_member_function_pointer does not account for ellipsis. PR20345. Patch from Agustin Berge.
I reviewed the patch and added the test cases. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -61,6 +61,18 @@ int main()
|
||||
test_member_function_pointer<void (Class::*)(int) volatile>();
|
||||
test_member_function_pointer<void (Class::*)(int, char) volatile>();
|
||||
|
||||
test_member_function_pointer<void (Class::*)(...)>();
|
||||
test_member_function_pointer<void (Class::*)(int, ...)>();
|
||||
test_member_function_pointer<void (Class::*)(int, char, ...)>();
|
||||
|
||||
test_member_function_pointer<void (Class::*)(...) const>();
|
||||
test_member_function_pointer<void (Class::*)(int, ...) const>();
|
||||
test_member_function_pointer<void (Class::*)(int, char, ...) const>();
|
||||
|
||||
test_member_function_pointer<void (Class::*)(...) volatile>();
|
||||
test_member_function_pointer<void (Class::*)(int, ...) volatile>();
|
||||
test_member_function_pointer<void (Class::*)(int, char, ...) volatile>();
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
// reference qualifiers on functions are a C++11 extension
|
||||
test_member_function_pointer<void (Class::*)() &&>();
|
||||
@@ -74,5 +86,17 @@ int main()
|
||||
test_member_function_pointer<void (Class::*)() volatile &&>();
|
||||
test_member_function_pointer<void (Class::*)(int) volatile &&>();
|
||||
test_member_function_pointer<void (Class::*)(int, char) volatile &&>();
|
||||
|
||||
test_member_function_pointer<void (Class::*)(...) &&>();
|
||||
test_member_function_pointer<void (Class::*)(int,...) &&>();
|
||||
test_member_function_pointer<void (Class::*)(int, char,...) &&>();
|
||||
|
||||
test_member_function_pointer<void (Class::*)(...) &>();
|
||||
test_member_function_pointer<void (Class::*)(int,...) &>();
|
||||
test_member_function_pointer<void (Class::*)(int, char,...) &>();
|
||||
|
||||
test_member_function_pointer<void (Class::*)(...) volatile &&>();
|
||||
test_member_function_pointer<void (Class::*)(int,...) volatile &&>();
|
||||
test_member_function_pointer<void (Class::*)(int, char,...) volatile &&>();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user