repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync with upstream 4.9 branch
[official-gcc.git]
/
embedded-4_9-branch
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
paren1.C
blob
809f2510099a402d4d81a2e324cf56efb95c9e85
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
12
X non_parenthesized()
13
{
14
X x;
15
return x; // works
16
}
17
18
X parenthesized()
19
{
20
X x;
21
return (x); // error: use of deleted function 'X::X(const X&)'
22
}
23
24
template <class T>
25
T parenthesized_t()
26
{
27
T t;
28
return (t);
29
}
30
31
template X parenthesized_t<X>();