libstdc++: Remove unused alias template in std::optional
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / overload1.C
blob2aa27ae7bdeb7ff4c95c73374d6bada0194a8b61
1 // { dg-do assemble  }
2 // Bug: g++ thinks there is a conversion from void * to B *.
4 struct A {
5   operator void* ();
6 };
8 struct B: public A { };
10 void bar (A& a) {
11   B* bp = (B*)a;                // { dg-error "11:invalid cast" }