29 inline bool has_initialized_state()
const noexcept
34 inline bool has_state()
const noexcept
36 return this->has_initialized_state() && this->_state !=
nullptr;
48 if (this->has_state()) {
49 Destructor(this->_state);
52 this->_state =
nullptr;
64 if (!this->has_initialized_state()) {
73 throw std::runtime_error(
"Accessing state after destruction.");
85 return &this->state();
88 inline int tp_traverse(visitproc visit,
void* arg)
90 if (this->has_state()) {
91 return this->_state->tp_traverse(visit, arg);