blob: 2d712b64a52a768f05838cbc38de6db5b2549b3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// { dg-do compile { target c++11 } }
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 "" }
|