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

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;