throwing_ptr
Smart pointers that throw on dereference if null
Classes | Namespaces | Functions
unique_ptr.hpp File Reference

throwing::unique_ptr implementation More...

Go to the source code of this file.

Classes

class  throwing::unique_ptr< T, Deleter >
 unique_ptr that manages a single object More...
 
class  throwing::unique_ptr< T[], Deleter >
 unique_ptr that manages a dynamically-allocated array of objects More...
 
struct  throwing::detail::_Unique_if< T >
 true for throwing::unique_ptr to single object More...
 
struct  throwing::detail::_Unique_if< T[]>
 true for throwing::unique_ptr to arrays of unknown length More...
 
struct  throwing::detail::_Unique_if< T[N]>
 true for throwing::unique_ptr to arrays of known length More...
 
struct  std::hash< throwing::unique_ptr< Type, Deleter > >
 Template specialization of std::hash for throwing::unique_ptr<T> More...
 

Namespaces

 throwing
 Implementations of throwing::shared_ptr, throwing::unique_ptr and related.
 
 throwing::detail
 Helpers for make_unique type resolution, see n3656.
 
 std
 

Functions

template<class T , class... Args>
detail::_Unique_if< T >::_Single_object throwing::make_unique (Args &&... args)
 Constructs an object of non-array type T and wraps it in a throwing::unique_ptr using args as the parameter list for the constructor of T. More...
 
template<class T >
detail::_Unique_if< T >::_Unknown_bound throwing::make_unique (size_t n)
 Constructs an array of unknown bound T and wraps it in a throwing::unique_ptr. More...
 
template<class T , class... Args>
detail::_Unique_if< T >::_Known_bound throwing::make_unique (Args &&...)=delete
 Construction of arrays of known bound is disallowed. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator== (const unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator!= (const unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator< (const unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator<= (const unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator> (const unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator>= (const unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator== (const std::unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator!= (const std::unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator< (const std::unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator<= (const std::unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator> (const std::unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator>= (const std::unique_ptr< T1, D1 > &lhs, const unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator== (const unique_ptr< T1, D1 > &lhs, const std::unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator!= (const unique_ptr< T1, D1 > &lhs, const std::unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator< (const unique_ptr< T1, D1 > &lhs, const std::unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator<= (const unique_ptr< T1, D1 > &lhs, const std::unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator> (const unique_ptr< T1, D1 > &lhs, const std::unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T1 , class D1 , class T2 , class D2 >
bool throwing::operator>= (const unique_ptr< T1, D1 > &lhs, const std::unique_ptr< T2, D2 > &rhs)
 Compare two unique_ptr objects. More...
 
template<class T , class D >
bool throwing::operator== (const unique_ptr< T, D > &lhs, std::nullptr_t rhs) TSP_NOEXCEPT
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator== (std::nullptr_t lhs, const unique_ptr< T, D > &rhs) TSP_NOEXCEPT
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator!= (const unique_ptr< T, D > &lhs, std::nullptr_t rhs) TSP_NOEXCEPT
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator!= (std::nullptr_t lhs, const unique_ptr< T, D > &rhs) TSP_NOEXCEPT
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator< (const unique_ptr< T, D > &lhs, std::nullptr_t rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator< (std::nullptr_t lhs, const unique_ptr< T, D > &rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator<= (const unique_ptr< T, D > &lhs, std::nullptr_t rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator<= (std::nullptr_t lhs, const unique_ptr< T, D > &rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator> (const unique_ptr< T, D > &lhs, std::nullptr_t rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator> (std::nullptr_t lhs, const unique_ptr< T, D > &rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator>= (const unique_ptr< T, D > &lhs, std::nullptr_t rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class T , class D >
bool throwing::operator>= (std::nullptr_t lhs, const unique_ptr< T, D > &rhs)
 Compare a unique_ptr with a null pointer. More...
 
template<class CharT , class Traits , class Y , class D >
std::basic_ostream< CharT, Traits > & throwing::operator<< (std::basic_ostream< CharT, Traits > &os, const unique_ptr< Y, D > &ptr)
 Inserts the value of the pointer stored in ptr into the output stream os. More...
 
template<class T >
void throwing::swap (throwing::unique_ptr< T > &lhs, throwing::unique_ptr< T > &rhs) TSP_NOEXCEPT
 Specializes the std::swap algorithm for throwing::unique_ptr. More...
 

Detailed Description

throwing::unique_ptr implementation

throwing/unique_ptr.hpp

Definition in file unique_ptr.hpp.