Template Class unique_ptr

Class Documentation

template<typename T>
class unique_ptr

A reimplementation of std::unique_ptr for improved compilation performance

Does not support arrays nor custom deleters.

Public Functions

inline constexpr unique_ptr(std::nullptr_t = nullptr)
inline explicit constexpr unique_ptr(T *ptr)
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
inline unique_ptr(unique_ptr<U> &&from)
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
inline unique_ptr &operator=(unique_ptr<U> &&from)
unique_ptr(unique_ptr const&) = delete
unique_ptr &operator=(unique_ptr const&) = delete
inline unique_ptr(unique_ptr &&rhs) noexcept
inline unique_ptr &operator=(unique_ptr &&rhs) noexcept
inline ~unique_ptr()
inline T &operator*()
inline T const &operator*() const
inline T *operator->() noexcept
inline T const *operator->() const noexcept
inline T *get()
inline T const *get() const
inline void reset(T *ptr = nullptr)
inline T *release()
inline explicit operator bool() const

Friends

inline friend void swap(unique_ptr &lhs, unique_ptr &rhs)