aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/conversion/ambig2.C
blob: a9d9d699cf0e6da1d11cd98e2fda8bc5cb63c65a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/57948

struct Base {   };
struct Derived : Base
{
  struct Derived2 : Base
  {
    struct ConvertibleToBothDerivedRef
    {
      operator Derived&();
      operator Derived2&();
      void bind_lvalue_to_conv_lvalue_ambig(ConvertibleToBothDerivedRef both)
      {
	Base &br1 = both; // { dg-error "ambiguous" }
      }
    };
  };
};