Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/friend19.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: Benjamin Li <benxbli@yahoo.com> | |
4 | |
5 // PR c++/11030: Template substitution of friend class that is | |
6 // a specialization. | |
7 | |
8 template <int S> | |
9 struct A | |
10 { | |
11 void func(void); | |
12 }; | |
13 | |
14 template <class T> | |
15 class C | |
16 { | |
17 static void private_func(void) {} | |
18 public: | |
19 friend class A<512>; | |
20 }; | |
21 | |
22 template <int S> | |
23 void A<S>::func(void) | |
24 { | |
25 C<void>::private_func(); | |
26 } | |
27 | |
28 template class A<512>; |