aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C
blob: 68d50b61b1206e5f540e743f2ad128843c561b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/53464
// { dg-do compile { target c++11 } }

template <int value>
struct bar
{
  static constexpr int get()
  {
    return value;
  }
};

template <typename A, int value = A::get()>
struct foo
{
};

int main()
{
  typedef foo<bar<0>> type;
  return 0;
}