1 // PR c++/63437 2 // { dg-do compile { target c++11 } } 3 4 struct X // movable but not copyable 5 { 6 X() = default; 7 X(X &&) = default; 8 9 X(const X &) = delete; 10 }; 11 non_parenthesized()12X non_parenthesized() 13 { 14 X x; 15 return x; // works 16 } 17 parenthesized()18X parenthesized() 19 { 20 X x; 21 return (x); // error: use of deleted function 'X::X(const X&)' 22 } 23 24 template <class T> parenthesized_t()25T parenthesized_t() 26 { 27 T t; 28 return (t); 29 } 30 31 template X parenthesized_t<X>(); 32