| Server IP : 198.38.94.67 / Your IP : 216.73.216.184 Web Server : LiteSpeed System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64 User : azfilmst ( 1070) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/alt-nodejs24/root/usr/include/node/cppgc/internal/ |
Upload File : |
// Copyright 2025 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef INCLUDE_CPPGC_INTERNAL_CONDITIONAL_STACK_ALLOCATED_H_
#define INCLUDE_CPPGC_INTERNAL_CONDITIONAL_STACK_ALLOCATED_H_
#include <type_traits>
#include "cppgc/macros.h" // NOLINT(build/include_directory)
#include "cppgc/type-traits.h" // NOLINT(build/include_directory)
namespace cppgc {
namespace internal {
// Base class that is marked as stack allocated if T is either marked as stack
// allocated or a traceable type.
template <typename T>
class ConditionalStackAllocatedBase;
template <typename T>
concept RequiresStackAllocated =
!std::is_void_v<T> &&
(cppgc::IsStackAllocatedType<T> || cppgc::internal::IsTraceableV<T> ||
cppgc::IsGarbageCollectedOrMixinTypeV<T>);
template <typename T>
requires(RequiresStackAllocated<T>)
class ConditionalStackAllocatedBase<T> {
public:
CPPGC_STACK_ALLOCATED();
};
template <typename T>
requires(!RequiresStackAllocated<T>)
class ConditionalStackAllocatedBase<T> {};
} // namespace internal
} // namespace cppgc
#endif // INCLUDE_CPPGC_INTERNAL_CONDITIONAL_STACK_ALLOCATED_H_