Cuda battery library
Loading...
Searching...
No Matches
battery::unique_ptr< T, Allocator > Class Template Reference

#include <unique_ptr.hpp>

Public Types

using element_type = T
 
using pointer = T*
 
using allocator_type = Allocator
 
using this_type = unique_ptr<element_type, allocator_type>
 

Public Member Functions

CUDA unique_ptr (const allocator_type &allocator=allocator_type())
 
CUDA unique_ptr (std::nullptr_t, const allocator_type &allocator=allocator_type())
 
CUDA unique_ptr (pointer ptr, const allocator_type &allocator=allocator_type())
 
CUDA unique_ptr (this_type &&from)
 
template<class U >
CUDA unique_ptr (unique_ptr< U, Allocator > &&from)
 
CUDA unique_ptr (const this_type &)=delete
 
CUDA NI ~unique_ptr ()
 
CUDA void swap (unique_ptr &other)
 
CUDA unique_ptroperator= (unique_ptr &&r)
 
template<class U >
CUDA unique_ptroperator= (unique_ptr< U, Allocator > &&r)
 
CUDA unique_ptroperator= (std::nullptr_t)
 
CUDA pointer release ()
 
CUDA void reset (pointer ptr=pointer())
 
CUDA pointer get () const
 
CUDA allocator_type get_allocator () const
 
CUDA operator bool () const
 
CUDA T & operator* () const
 
CUDA pointer operator-> () const
 

Friends

template<class U , class Alloc >
class unique_ptr
 

Member Typedef Documentation

◆ element_type

template<class T , class Allocator = standard_allocator>
using battery::unique_ptr< T, Allocator >::element_type = T

◆ pointer

template<class T , class Allocator = standard_allocator>
using battery::unique_ptr< T, Allocator >::pointer = T*

◆ allocator_type

template<class T , class Allocator = standard_allocator>
using battery::unique_ptr< T, Allocator >::allocator_type = Allocator

◆ this_type

template<class T , class Allocator = standard_allocator>
using battery::unique_ptr< T, Allocator >::this_type = unique_ptr<element_type, allocator_type>

Constructor & Destructor Documentation

◆ unique_ptr() [1/6]

template<class T , class Allocator = standard_allocator>
CUDA battery::unique_ptr< T, Allocator >::unique_ptr ( const allocator_type & allocator = allocator_type())
inline

◆ unique_ptr() [2/6]

template<class T , class Allocator = standard_allocator>
CUDA battery::unique_ptr< T, Allocator >::unique_ptr ( std::nullptr_t ,
const allocator_type & allocator = allocator_type() )
inline

◆ unique_ptr() [3/6]

template<class T , class Allocator = standard_allocator>
CUDA battery::unique_ptr< T, Allocator >::unique_ptr ( pointer ptr,
const allocator_type & allocator = allocator_type() )
inlineexplicit

◆ unique_ptr() [4/6]

template<class T , class Allocator = standard_allocator>
CUDA battery::unique_ptr< T, Allocator >::unique_ptr ( this_type && from)
inline

◆ unique_ptr() [5/6]

template<class T , class Allocator = standard_allocator>
template<class U >
CUDA battery::unique_ptr< T, Allocator >::unique_ptr ( unique_ptr< U, Allocator > && from)
inline

◆ unique_ptr() [6/6]

template<class T , class Allocator = standard_allocator>
CUDA battery::unique_ptr< T, Allocator >::unique_ptr ( const this_type & )
delete

◆ ~unique_ptr()

template<class T , class Allocator = standard_allocator>
CUDA NI battery::unique_ptr< T, Allocator >::~unique_ptr ( )
inline

Member Function Documentation

◆ swap()

template<class T , class Allocator = standard_allocator>
CUDA void battery::unique_ptr< T, Allocator >::swap ( unique_ptr< T, Allocator > & other)
inline

◆ operator=() [1/3]

template<class T , class Allocator = standard_allocator>
CUDA unique_ptr & battery::unique_ptr< T, Allocator >::operator= ( unique_ptr< T, Allocator > && r)
inline

◆ operator=() [2/3]

template<class T , class Allocator = standard_allocator>
template<class U >
CUDA unique_ptr & battery::unique_ptr< T, Allocator >::operator= ( unique_ptr< U, Allocator > && r)
inline

◆ operator=() [3/3]

template<class T , class Allocator = standard_allocator>
CUDA unique_ptr & battery::unique_ptr< T, Allocator >::operator= ( std::nullptr_t )
inline

◆ release()

template<class T , class Allocator = standard_allocator>
CUDA pointer battery::unique_ptr< T, Allocator >::release ( )
inline

◆ reset()

template<class T , class Allocator = standard_allocator>
CUDA void battery::unique_ptr< T, Allocator >::reset ( pointer ptr = pointer())
inline

◆ get()

template<class T , class Allocator = standard_allocator>
CUDA pointer battery::unique_ptr< T, Allocator >::get ( ) const
inline

◆ get_allocator()

template<class T , class Allocator = standard_allocator>
CUDA allocator_type battery::unique_ptr< T, Allocator >::get_allocator ( ) const
inline

◆ operator bool()

template<class T , class Allocator = standard_allocator>
CUDA battery::unique_ptr< T, Allocator >::operator bool ( ) const
inlineexplicit

◆ operator*()

template<class T , class Allocator = standard_allocator>
CUDA T & battery::unique_ptr< T, Allocator >::operator* ( ) const
inline

◆ operator->()

template<class T , class Allocator = standard_allocator>
CUDA pointer battery::unique_ptr< T, Allocator >::operator-> ( ) const
inline

Friends And Related Symbol Documentation

◆ unique_ptr

template<class T , class Allocator = standard_allocator>
template<class U , class Alloc >
friend class unique_ptr
friend

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