OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/36628
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
auto14.C
1
// PR c++/40306, c++/40307
2
// { dg-options "-std=c++0x" }
3
// { dg-do run }
4
5
template< typename T >
6
struct test {
7
test run() {
8
auto tmp = *this;
9
return tmp;
10
}
11
test run_pass() {
12
test tmp( *this );
13
return tmp;
14
}
15
16
test run_fail() {
17
auto tmp( *this );
18
return tmp;
19
}
20
};
21
22
int main()
23
{
24
test<int> x;
25
x.run();
26
x.run_pass();
27
x.run_fail();
28
return 0;
29
}