summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/new2.C
blob: 682ca6e18620f06c4415e18257bcdbe0b0956468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/21336

typedef __SIZE_TYPE__ size_t;
template<class _T> void* operator new( size_t Size, _T&);
struct B {
  int a;
  int* m() {
    return new(a) int;
  }
};
B* n() {
  return new B();
}