rt_gccstream/gcc/testsuite/g++.old-deja/g++.mike/p438.C

24 lines
281 B
C

// { dg-do assemble }
// prms-id: 438
class D;
class C
{
public:
void test() const;
};
class D
{
public:
void a(C& b); // { dg-message "candidate is" }
};
void C::test() const
{
D d;
d.a(*this); // { dg-error "match" } *this is const, so should get error
}