| 1 |
// P0466R5 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
|
| 4 |
struct A { int a; }; |
| 5 |
struct B; |
| 6 |
|
| 7 |
bool a = __builtin_is_pointer_interconvertible_with_class (); // { dg-error "needs a single argument" } |
| 8 |
bool b = __builtin_is_pointer_interconvertible_with_class (&A::a, &A::a); // { dg-error "needs a single argument" } |
| 9 |
bool c = __builtin_is_pointer_interconvertible_with_class (1); // { dg-error "argument is not pointer to member" } |
| 10 |
bool d = __builtin_is_pointer_interconvertible_with_class (1.0); // { dg-error "argument is not pointer to member" } |
| 11 |
bool e = __builtin_is_pointer_interconvertible_with_class ((int B::*) nullptr); // { dg-error "invalid use of incomplete type" } |