21 void *data_ =
nullptr;
29 BLI_assert(data_ ==
nullptr || type_ !=
nullptr);
34 template<
typename T, BLI_ENABLE_IF(!std::is_
void_v<T>)>
51 return data_ !=
nullptr;
54 template<
typename T>
T *
get()
const
57 return static_cast<T *
>(data_);
62 return type_ !=
nullptr && type_->is<
T>();
69 type_->relocate_assign(data_, &value);
78 type_->destruct(data_);
88 const void *data_ =
nullptr;
98 BLI_assert(data_ ==
nullptr || type_ !=
nullptr);
103 template<
typename T, BLI_ENABLE_IF((!std::is_
void_v<T>))>
108 operator bool()
const
110 return data_ !=
nullptr;
123 template<
typename T>
const T *
get()
const
126 return static_cast<const T *
>(data_);
131 return type_ !=
nullptr && type_->is<
T>();
BMesh const char void * data
GMutablePointer(const CPPType *type, void *data=nullptr)
GMutablePointer()=default
const CPPType * type() const
GMutablePointer(const CPPType &type, void *data=nullptr)
GPointer(GMutablePointer ptr)
const CPPType * type() const
GPointer(const CPPType &type, const void *data=nullptr)
GPointer(const CPPType *type, const void *data=nullptr)