Sync with upstream 4.9 branch
[official-gcc.git] / embedded-4_9-branch / gcc / testsuite / g++.dg / cpp1y / paren1.C
blob809f2510099a402d4d81a2e324cf56efb95c9e85
1 // PR c++/63437
2 // { dg-do compile { target c++11 } }
4 struct X // movable but not copyable
6     X() = default;
7     X(X &&) = default;
9     X(const X &) = delete;
12 X non_parenthesized()
14     X x;
15     return x; // works
18 X parenthesized()
20     X x;
21     return (x); // error: use of deleted function 'X::X(const X&)'
24 template <class T>
25 T parenthesized_t()
27   T t;
28   return (t);
31 template X parenthesized_t<X>();