Debian Codegraph @

gcc/testsuite/g++.dg/init/new1.C

raw
1 // Origin: [email protected]
2
3 // { dg-do compile }
4
5 typedef __SIZE_TYPE__ size_t;
6
7 class bar {
8 int i;
9 public :
10 void * operator new ( size_t , void * storage );
11 };
12
13 class foo {
14 int storage[ 5 ];
15 public:
16 void mem ( ) {
17 bar *s = new ( ( void * ) & storage ) bar;
18 }
19 };