15 #ifndef _DATAT_BITS_INCLUDE_TAG
16 #error Must only be included from sag_connectivity_cpp.hpp, use that instead
53 T *
get()
const {
return this->data ?
reinterpret_cast<T*
>(this->data->custom) : 0; }
68 static void deleter(
void *d)
72 delete reinterpret_cast<T*
>(d);
80 static void *copier(
void *d)
83 return d ?
new T(*reinterpret_cast<T*>(d)) : 0;
T & operator*() const
Return the wrapped pointer as the correct type.
Definition: custom_t.hpp:63
void swap(custom_t &&other)
Swap with another custom_t of the same type.
A wrapper type for holding arbitrary objects inside a data_t.
Definition: custom_t.hpp:42
~custom_t()
deletes the underlying pointer.
custom_t copy() const
Return a copy of the underlying pointer.
custom_t()
Create an empty custom_t.
T * operator->() const
Return the wrapped pointer as the correct type.
Definition: custom_t.hpp:65
custom_t & operator=(custom_t &&other)
Move assignment, destroying the current contents.