summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
blob: dc0b7429dc65c7c52f92e2a9bfae3196b6df8966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// A constructor that might or might not be constexpr still makes
// its class literal.
// { dg-options -std=c++0x }

template <class T>
struct B
{
  constexpr B(T) { }
  constexpr B() {}
};

struct A
{
  B<A> b;
};

constexpr A a {};

template <class T>
struct C
{
  constexpr C(T) { }
  C() {}
};

struct D
{
  C<D> c;
};

constexpr D d {};		// { dg-error "not a constexpr function" }