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

struct A
{
  ~A();
};

template<class T>
struct W {
  T t;
  template<class U>
  constexpr W(U&& u) : t(u) {}
};

template <class T>
constexpr W<T> make_w(T& w) { return W<T>(w); }

A a;
constexpr auto w = make_w(a);	// { dg-error "" }