nlib
UniquePtr.h File Reference

Defines that class that is corresponding to std::unique_ptr. More...

#include <stdlib.h>
#include <memory>
#include "nn/nlib/Config.h"
#include "nn/nlib/Swap.h"
#include "nn/nlib/Hash.h"
#include "nn/nlib/TypeTraits.h"
#include <algorithm>

Go to the source code of this file.

Classes

class  nn::nlib::UniquePtr< T, DEL >
 UniquePtr owns the pointer, and when it goes out of scope, the pointer is released by the destructor using the method specified by DEL. More...
 

Namespaces

 nn::nlib
 Implements common features and features that are highly platform-dependent. Also refer to nlib Platform APIs. nlib_ns is an alias.
 

Functions

template<class T1 , class D1 , class T2 , class D2 >
bool nn::nlib::operator== (const UniquePtr< T1, D1 > &rhs, const UniquePtr< T2, D2 > &lhs) noexcept
 Returns true if holding the same pointer.
 
template<class T1 , class D1 >
bool nn::nlib::operator== (const UniquePtr< T1, D1 > &lhs, nullptr_t) noexcept
 Returns true if lhs is NULL.
 
template<class T1 , class D1 >
bool nn::nlib::operator== (nullptr_t, const UniquePtr< T1, D1 > &rhs) noexcept
 Returns true if rhs is NULL.
 
template<class T1 , class D1 , class T2 , class D2 >
bool nn::nlib::operator!= (const UniquePtr< T1, D1 > &rhs, const UniquePtr< T2, D2 > &lhs) noexcept
 Returns true if not holding the same pointer.
 
template<class T1 , class D1 >
bool nn::nlib::operator!= (const UniquePtr< T1, D1 > &lhs, nullptr_t) noexcept
 Returns true if lhs is not NULL.
 
template<class T1 , class D1 >
bool nn::nlib::operator!= (nullptr_t, const UniquePtr< T1, D1 > &rhs) noexcept
 Returns true if rhs is not NULL.
 

Detailed Description

Defines that class that is corresponding to std::unique_ptr.

Definition in file UniquePtr.h.