Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/pr4926-1.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 // PR c++/4926 |
2 // { dg-do compile } | |
3 | |
4 template <unsigned> struct X { typedef int Type; }; | |
5 template <typename T> struct Y { char array[1]; }; | |
6 | |
7 template<typename T> Y<T> P(T); // acts as "Y<typeof(T)>" | |
8 | |
9 struct F { int operator()() const; }; | |
10 | |
11 template <typename T> | |
12 typename X<sizeof(P( T()() ).array)>::Type foo(); | |
13 | |
14 void | |
15 bar () | |
16 { | |
17 foo<F>(); | |
18 } |