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++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
overload
/
defarg8.C
blob
b3ddfbb76cf4619c4162bf3ed54037d2a8845b45
1
// PR c++/60367
2
// { dg-do run { target c++11 } }
3
4
extern "C" int printf (const char *, ...);
5
extern "C" void abort();
6
7
void *p;
8
struct foo {
9
foo() { p = this; }
10
foo (const foo &) { abort(); }
11
~foo() { if (p != this) abort(); }
12
};
13
14
void do_something( foo f = {} )
15
{
16
if (&f != p) abort();
17
}
18
19
int main()
20
{
21
do_something();
22
}