aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/explicit-obj-ops-alloc.C
blob: 8a277db7ef5fe8a464d9b603b78b34869106c771 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/114078
// { dg-do compile { target c++23 } }

using size_t = decltype(sizeof(0));

struct S {
  void* operator new(this size_t);  // { dg-error "explicit object" }
  void* operator new[](this size_t);  // { dg-error "explicit object" }
  void operator delete(this void*);  // { dg-error "explicit object" }
  void operator delete[](this void*);  // { dg-error "explicit object" }
};