Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/typedef33.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 // Origin PR c++/43800 |
2 // { dg-do compile } | |
3 | |
4 template<class T, class U=T> | |
5 struct V | |
6 { | |
7 typedef T t_type; | |
8 }; | |
9 | |
10 template<class T> | |
11 class J | |
12 { | |
13 typedef typename V<T>::t_type t_type; | |
14 const t_type& f(); // #0: | |
15 private: | |
16 t_type b; | |
17 }; | |
18 | |
19 template<class T> | |
20 const typename V<T>::t_type& J<T>::f() {return b;} // #1 | |
21 |