Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/lookup/friend6.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
2 | |
3 // Origin: Matt Austern <austern@apple.com> | |
4 | |
5 // PR c++/19258: Wrong lookup scope for friend defined in class. | |
6 | |
7 class X { | |
8 template<class T> friend int ff(T*, int y=anX.x) { return y; } | |
9 int f() { return ff(&anX); } | |
10 | |
11 static X anX; | |
12 int x; | |
13 }; | |
14 | |
15 X dummy; |