summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C
blob: a34704d839c4d1f1fbb4b2f5b052299e72042bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-options -std=c++0x }

struct B
{
  constexpr operator int() { return 4; }
};

template <int I>
struct C;

template<>
struct C<4> { typedef int TP; };

template <class T>
struct A
{
  constexpr static B t = B();
  C<t>::TP tp;
};

A<B> a;