aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/typename5.C
blob: 2f72b5f86019cc2e6885d08ee4779282ff0fd95a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }

// Origin: ariels@compugen.co.il

// PR c++/2513: typename handling when scope is dependent as
// described in DR108.

template <bool flag> struct Select {
  typedef int Result;
};

template <template<class> class Pred> struct FindType {
  typedef typename Select<true>::Result Result;
};

template <int bits> struct Int {
  template<typename T> struct RightSize {};
  typedef typename FindType<RightSize>::Result type;
};