| 1 |
// { dg-do compile } |
| 2 |
|
| 3 |
// Copyright (C) 2002 Free Software Foundation, Inc. |
| 4 |
// Contributed by Nathan Sidwell 04 Mar 2002 <[email protected]> |
| 5 |
// Jason Merrill <[email protected]> |
| 6 |
|
| 7 |
struct A { int i; }; |
| 8 |
struct B: private A {}; |
| 9 |
struct C { |
| 10 |
C (int A::*); |
| 11 |
}; |
| 12 |
|
| 13 |
int A::*aip = &A::i; |
| 14 |
|
| 15 |
void f (int B::*) {} // should choose this, even though it's ill-formed |
| 16 |
void f (C) {} // even though this would be well-formed |
| 17 |
|
| 18 |
int main () |
| 19 |
{ |
| 20 |
f (aip); // { dg-error "'A' is an inaccessible base of 'B'|conversion" } |
| 21 |
} |