20 #ifndef GALOIS_LAZYOBJECT_H
21 #define GALOIS_LAZYOBJECT_H
23 #include <type_traits>
26 #include "galois/config.h"
73 typename std::aligned_storage<
sizeof(T),
74 std::alignment_of<T>::value>::type CharData;
85 T& value() {
return value_; }
86 const T& value()
const {
return value_; }
91 T* cast() {
return &data_.value(); }
92 const T* cast()
const {
return &data_.value(); }
102 const static size_t value =
sizeof(T);
108 template <
typename... Args>
110 new (cast()) T(std::forward<Args>(args)...);
130 template <
typename... Args>
StrictObject(const_reference t)
Definition: LazyObject.h:47
Single (uninitialized) object with specialization for void type.
Definition: LazyObject.h:71
static const bool has_value
Definition: LazyObject.h:44
T value_type
Definition: LazyObject.h:95
void construct(const_reference x)
Definition: LazyObject.h:106
const T & const_reference
Definition: LazyObject.h:43
Single object with specialization for void type.
Definition: LazyObject.h:37
Definition: LazyObject.h:101
T & reference
Definition: LazyObject.h:96
void * value_type
Definition: LazyObject.h:54
T value_type
Definition: LazyObject.h:41
T & reference
Definition: LazyObject.h:42
void * value_type
Definition: LazyObject.h:119
void * const_reference
Definition: LazyObject.h:56
void destroy()
Definition: LazyObject.h:127
void destroy()
Definition: LazyObject.h:105
void construct(Args &&...)
Definition: LazyObject.h:131
Definition: OCGraph.h:338
void construct(Args &&...args)
Definition: LazyObject.h:109
StrictObject()
Definition: LazyObject.h:59
const T & const_reference
Definition: LazyObject.h:97
void * const_reference
Definition: LazyObject.h:121
StrictObject(const_reference)
Definition: LazyObject.h:60
void construct(const_reference)
Definition: LazyObject.h:128
StrictObject()
Definition: LazyObject.h:46
static const size_t value
Definition: LazyObject.h:102
void * reference
Definition: LazyObject.h:55
void * reference
Definition: LazyObject.h:120
static const bool has_value
Definition: LazyObject.h:98