summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/ref8.C
blob: 406cc10401d4ca5487645b97ec9eca7dc7ad87f9 (plain)
1
2
3
4
5
6
7
8
9
10
struct A {
   A operator=(const A&);
};

A operator*(A, A);

A& operator+=(A& a, const A& b)
{
   return a = a * b;            // { dg-error "non-const reference" }
}