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
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
rv9p.C
blob
a221f32d34fadaca94aec0e2fbf2ebf8d5e95e65
1
// PR c++/36744
2
// { dg-do run { target c++11 } }
3
4
struct S
5
{
6
S(): i(2) {}
7
S(S const&s): i(s.i) {}
8
int i;
9
};
10
11
void f(S x) { x.i = 0; }
12
13
extern "C" void abort (void);
14
int main()
15
{
16
S y;
17
f(static_cast<S&&>(y));
18
if (y.i != 2)
19
abort ();
20
return 0;
21
}