v8 10.2.154 (node 18.16.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
macros.h
Go to the documentation of this file.
1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef INCLUDE_CPPGC_MACROS_H_
6#define INCLUDE_CPPGC_MACROS_H_
7
8#include <cstddef>
9
11
12namespace cppgc {
13
14// Use if the object is only stack allocated.
15#define CPPGC_STACK_ALLOCATED() \
16 public: \
17 using IsStackAllocatedTypeMarker CPPGC_UNUSED = int; \
18 \
19 private: \
20 void* operator new(size_t) = delete; \
21 void* operator new(size_t, void*) = delete; \
22 static_assert(true, "Force semicolon.")
23
24} // namespace cppgc
25
26#endif // INCLUDE_CPPGC_MACROS_H_