Public Types | Public Member Functions | List of all members
ustl::unique_ptr< T > Class Template Reference

A smart pointer. Calls delete in the destructor; assignment transfers ownership. This class does not work with void pointers due to the absence of the required dereference operator. More...

Public Types

using element_type = T
 
using pointer = element_type *
 
using reference = element_type &
 

Public Member Functions

constexpr unique_ptr (pointer p)
 
 unique_ptr (unique_ptr &&p)
 
 unique_ptr (const unique_ptr &)=delete
 
constexpr pointer get (void) const
 
pointer release (void)
 
void reset (pointer p=nullptr)
 
void swap (unique_ptr &v)
 
constexpr operator bool (void) const
 
unique_ptroperator= (pointer p)
 
unique_ptroperator= (unique_ptr &&p)
 
unique_ptroperator= (const unique_ptr &)=delete
 
constexpr reference operator* (void) const
 
constexpr pointer operator-> (void) const
 
constexpr reference operator[] (size_t i) const
 
constexpr bool operator== (const pointer p) const
 
constexpr bool operator== (const unique_ptr &p) const
 
constexpr bool operator< (const unique_ptr &p) const
 

Detailed Description

template<typename T>
class ustl::unique_ptr< T >

A smart pointer. Calls delete in the destructor; assignment transfers ownership. This class does not work with void pointers due to the absence of the required dereference operator.


The documentation for this class was generated from the following file:

Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10