OSDN Git Service

update
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.mike / p807.C
1 // prms-id: 807
2
3 extern "C" int printf(const char*, ...);
4
5 class B;
6
7 class AX
8 {
9  protected:
10    int x;
11
12  public:
13    operator B();
14 };
15
16
17 class B
18 {
19  private:
20    int x;
21  public:
22    B(const AX&);
23 };
24
25
26 int foo(B& b);                  // ERROR - referenced below
27
28
29 main()
30 {
31    AX a;
32    foo(a);  // ERROR - Ambiguous B(a) or a.operator B()  //  See ARM 12.3.2
33
34 }