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
/
defaulted19a.C
blob
a082d51ab07f593693bd23409301be15033f06a8
1
// We allocate a cookie to help us run the destructor if it's non-trivial,
2
// even if it's deleted.
3
// { dg-do run { target c++11 } }
4
5
struct B { ~B() {} };
6
struct A
7
{
8
B b;
9
~A() = delete;
10
};
11
12
void *p = 0;
13
void *operator new[](__SIZE_TYPE__ t)
14
{
15
p = ::operator new (t);
16
return p;
17
}
18
19
int main()
20
{
21
A* ap = new A[5];
22
return ap == p;
23
}