Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/ref2.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 // Copyright (C) 2005 Free Software Foundation, Inc. |
2 // Contributed by Nathan Sidwell 7 Jan 2005 <nathan@codesourcery.com> | |
3 | |
4 // PR 19298: Rejects legal | |
5 // Origin: Andrew Pinski <pinskia@gcc.gnu.org> | |
6 | |
7 struct t | |
8 { | |
9 void f() const; | |
10 }; | |
11 | |
12 template <typename _Tp> | |
13 struct A | |
14 { | |
15 static t const& c; | |
16 }; | |
17 | |
18 template <typename _Tp> | |
19 void g(void) | |
20 { | |
21 A<_Tp>::c.f(); | |
22 } | |
23 | |
24 void h(void) | |
25 { | |
26 g<int>(); | |
27 } |