|
Potato Engine
Hobby Game Engine Project
|
An owning non-copyable pointer to a heap-allocated object, analogous to std::unique_ptr but without custom deleter support. More...
#include <box.h>
Public Types | |
| using | pointer = typename up::_detail::box_traits< T >::pointer |
| using | reference = typename up::_detail::box_traits< T >::reference |
Public Member Functions | |
| box (std::nullptr_t) | |
| box & | operator= (std::nullptr_t) |
| box (pointer ptr) | |
| box (box &&src) | |
| box & | operator= (box &&src) |
| template<typename U > | |
| box (box< U > &&src) | |
| template<typename U > | |
| enable_if_t< std::is_assignable_v< T *, U * >, box & > | operator= (box< U > &&src) |
| pointer | get () const |
| pointer | operator-> () const |
| reference | operator* () const |
| operator bool () const | |
| bool | empty () const |
| void | reset (pointer ptr=pointer{}) |
| pointer | release () |
Friends | |
| template<typename U > | |
| bool | operator== (box const &lhs, box< U > const &rhs) |
| template<typename U > | |
| bool | operator!= (box const &lhs, box< U > const &rhs) |
| template<typename U > | |
| bool | operator<= (box const &lhs, box< U > const &rhs) |
| template<typename U > | |
| bool | operator< (box const &lhs, box< U > const &rhs) |
| template<typename U > | |
| bool | operator== (box const &lhs, U const *rhs) |
| template<typename U > | |
| bool | operator!= (box const &lhs, U const *rhs) |
| template<typename U > | |
| bool | operator<= (box const &lhs, U const *rhs) |
| template<typename U > | |
| bool | operator< (box const &lhs, U const *rhs) |
| template<typename U > | |
| bool | operator== (U const *lhs, box const &rhs) |
| template<typename U > | |
| bool | operator!= (U const *lhs, box const &rhs) |
| template<typename U > | |
| bool | operator<= (U const *lhs, box const &rhs) |
| template<typename U > | |
| bool | operator< (U const *lhs, box const &rhs) |
| bool | operator== (box const &lhs, std::nullptr_t) |
| bool | operator!= (box const &lhs, std::nullptr_t) |
| bool | operator<= (box const &lhs, std::nullptr_t) |
| bool | operator< (box const &, std::nullptr_t) |
| bool | operator== (std::nullptr_t, box const &rhs) |
| bool | operator!= (std::nullptr_t, box const &rhs) |
| bool | operator<= (std::nullptr_t, box const &) |
| bool | operator< (std::nullptr_t, box const &rhs) |
An owning non-copyable pointer to a heap-allocated object, analogous to std::unique_ptr but without custom deleter support.
| T | Type of the object owned by the box. |
1.8.13