V8 Project
v8::base::StaticallyAllocatedInstanceTrait< T > Struct Template Reference

#include <lazy-instance.h>

+ Collaboration diagram for v8::base::StaticallyAllocatedInstanceTrait< T >:

Public Member Functions

struct V8_ALIGNAS (T, 16) StorageType
 
 STATIC_ASSERT (V8_ALIGNOF(StorageType) >=V8_ALIGNOF(T))
 

Static Public Member Functions

static TMutableInstance (StorageType *storage)
 
template<typename ConstructTrait >
static void InitStorageUsingTrait (StorageType *storage)
 

Detailed Description

template<typename T>
struct v8::base::StaticallyAllocatedInstanceTrait< T >

Definition at line 94 of file lazy-instance.h.

Member Function Documentation

◆ InitStorageUsingTrait()

template<typename T >
template<typename ConstructTrait >
static void v8::base::StaticallyAllocatedInstanceTrait< T >::InitStorageUsingTrait ( StorageType *  storage)
inlinestatic

Definition at line 107 of file lazy-instance.h.

107  {
108  ConstructTrait::Construct(MutableInstance(storage));
109  }
static T * MutableInstance(StorageType *storage)

References v8::base::StaticallyAllocatedInstanceTrait< T >::MutableInstance().

+ Here is the call graph for this function:

◆ MutableInstance()

template<typename T >
static T* v8::base::StaticallyAllocatedInstanceTrait< T >::MutableInstance ( StorageType *  storage)
inlinestatic

Definition at line 102 of file lazy-instance.h.

102  {
103  return reinterpret_cast<T*>(storage);
104  }
#define T(name, string, precedence)
Definition: token.cc:25

References T.

Referenced by v8::base::StaticallyAllocatedInstanceTrait< T >::InitStorageUsingTrait().

+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

template<typename T >
v8::base::StaticallyAllocatedInstanceTrait< T >::STATIC_ASSERT ( V8_ALIGNOF(StorageType) >=V8_ALIGNOF(T )

◆ V8_ALIGNAS()

template<typename T >
struct v8::base::StaticallyAllocatedInstanceTrait< T >::V8_ALIGNAS ( T  ,
16   
)
inline

Definition at line 86 of file lazy-instance.h.

96  {
97  char x[sizeof(T)];
98  };

The documentation for this struct was generated from the following file: