1#ifndef LIPH_LANG_NO_DESTRUCTOR_H_
2#define LIPH_LANG_NO_DESTRUCTOR_H_
11 template <
typename... Args>
13 new (storage_) T(std::forward<Args>(args)...);
22 const T *
get()
const {
return reinterpret_cast<const T *
>(storage_); }
23 T *
get() {
return reinterpret_cast<T *
>(storage_); }
32 char storage_[
sizeof(T)];
Definition: no_destructor.h:9
T & operator*()
Definition: no_destructor.h:26
no_destructor(const T &x)
Definition: no_destructor.h:16
const T * operator->() const
Definition: no_destructor.h:28
const T & operator*() const
Definition: no_destructor.h:25
const T * get() const
Definition: no_destructor.h:22
no_destructor(const no_destructor &)=delete
no_destructor & operator=(const no_destructor &)=delete
T * operator->()
Definition: no_destructor.h:29
no_destructor(Args &&...args)
Definition: no_destructor.h:12
no_destructor(T &&x)
Definition: no_destructor.h:17
T * get()
Definition: no_destructor.h:23
Definition: algorithm.h:10