blob: 809f2510099a402d4d81a2e324cf56efb95c9e85 (
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
|
// PR c++/63437
// { dg-do compile { target c++11 } }
struct X // movable but not copyable
{
X() = default;
X(X &&) = default;
X(const X &) = delete;
};
X non_parenthesized()
{
X x;
return x; // works
}
X parenthesized()
{
X x;
return (x); // error: use of deleted function 'X::X(const X&)'
}
template <class T>
T parenthesized_t()
{
T t;
return (t);
}
template X parenthesized_t<X>();
|