libcopp  2.2.0
Public Types | Public Member Functions | Private Attributes
gsl::strict_not_null< T > Class Template Reference

#include <not_null.h>

Inheritance diagram for gsl::strict_not_null< T >:
Inheritance graph
Collaboration diagram for gsl::strict_not_null< T >:
Collaboration graph

Public Types

using value_type = typename std::conditional< std::is_copy_constructible< T >::value, T, const T & >::type
 

Public Member Functions

template<class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
constexpr strict_not_null (U &&u)
 
template<class = typename std::enable_if<!std::is_same<std::nullptr_t, T>::value>::type>
constexpr strict_not_null (T u)
 
template<class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
constexpr strict_not_null (const not_null< U > &other)
 
template<class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
constexpr strict_not_null (const strict_not_null< U > &other)
 
 strict_not_null (strict_not_null &&other)=default
 
 strict_not_null (const strict_not_null &other)=default
 
strict_not_nulloperator= (const strict_not_null &other)=default
 
strict_not_nulloperator= (const not_null< T > &other)
 
 strict_not_null (std::nullptr_t)=delete
 
strict_not_nulloperator= (std::nullptr_t)=delete
 
strict_not_nulloperator++ ()=delete
 
strict_not_nulloperator-- ()=delete
 
strict_not_null operator++ (int)=delete
 
strict_not_null operator-- (int)=delete
 
strict_not_nulloperator+= (std::ptrdiff_t)=delete
 
strict_not_nulloperator-= (std::ptrdiff_t)=delete
 
void operator[] (std::ptrdiff_t) const =delete
 
constexpr value_type get () const
 
constexpr operator T () const
 
constexpr value_type operator-> () const
 
constexpr std::remove_pointer< value_type >::type operator* () const
 

Private Attributes

ptr_
 

Detailed Description

template<class T>
class gsl::strict_not_null< T >

Definition at line 183 of file not_null.h.

Member Typedef Documentation

◆ value_type

template<class T >
using gsl::not_null< T >::value_type = typename std::conditional<std::is_copy_constructible<T>::value, T, const T&>::type
inherited

Definition at line 68 of file not_null.h.

Constructor & Destructor Documentation

◆ strict_not_null() [1/7]

template<class T >
template<class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
constexpr gsl::strict_not_null< T >::strict_not_null ( U &&  u)
inlineexplicitconstexpr

Definition at line 186 of file not_null.h.

◆ strict_not_null() [2/7]

template<class T >
template<class = typename std::enable_if<!std::is_same<std::nullptr_t, T>::value>::type>
constexpr gsl::strict_not_null< T >::strict_not_null ( u)
inlineexplicitconstexpr

Definition at line 189 of file not_null.h.

◆ strict_not_null() [3/7]

template<class T >
template<class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
constexpr gsl::strict_not_null< T >::strict_not_null ( const not_null< U > &  other)
inlineconstexpr

Definition at line 192 of file not_null.h.

◆ strict_not_null() [4/7]

template<class T >
template<class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
constexpr gsl::strict_not_null< T >::strict_not_null ( const strict_not_null< U > &  other)
inlineconstexpr

Definition at line 195 of file not_null.h.

◆ strict_not_null() [5/7]

template<class T >
gsl::strict_not_null< T >::strict_not_null ( strict_not_null< T > &&  other)
default

◆ strict_not_null() [6/7]

template<class T >
gsl::strict_not_null< T >::strict_not_null ( const strict_not_null< T > &  other)
default

◆ strict_not_null() [7/7]

template<class T >
gsl::strict_not_null< T >::strict_not_null ( std::nullptr_t  )
delete

Member Function Documentation

◆ get()

template<class T >
constexpr value_type gsl::not_null< T >::get ( ) const
inlineconstexprinherited

◆ operator T()

template<class T >
constexpr gsl::not_null< T >::operator T ( ) const
inlineconstexprinherited

Definition at line 89 of file not_null.h.

References gsl::not_null< T >::get().

◆ operator*()

template<class T >
constexpr std::remove_pointer<value_type>::type gsl::not_null< T >::operator* ( ) const
inlineconstexprinherited

Definition at line 91 of file not_null.h.

References gsl::not_null< T >::get().

◆ operator++() [1/2]

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator++ ( )
delete

◆ operator++() [2/2]

template<class T >
strict_not_null gsl::strict_not_null< T >::operator++ ( int  )
delete

◆ operator+=()

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator+= ( std::ptrdiff_t  )
delete

◆ operator--() [1/2]

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator-- ( )
delete

◆ operator--() [2/2]

template<class T >
strict_not_null gsl::strict_not_null< T >::operator-- ( int  )
delete

◆ operator-=()

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator-= ( std::ptrdiff_t  )
delete

◆ operator->()

template<class T >
constexpr value_type gsl::not_null< T >::operator-> ( ) const
inlineconstexprinherited

Definition at line 90 of file not_null.h.

References gsl::not_null< T >::get().

◆ operator=() [1/3]

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator= ( const not_null< T > &  other)
inline

Definition at line 200 of file not_null.h.

References gsl::not_null< T >::operator=().

◆ operator=() [2/3]

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator= ( const strict_not_null< T > &  other)
default

◆ operator=() [3/3]

template<class T >
strict_not_null& gsl::strict_not_null< T >::operator= ( std::nullptr_t  )
delete

◆ operator[]()

template<class T >
void gsl::strict_not_null< T >::operator[] ( std::ptrdiff_t  ) const
delete

Field Documentation

◆ ptr_

template<class T >
T gsl::not_null< T >::ptr_
privateinherited

Definition at line 107 of file not_null.h.

Referenced by gsl::not_null< T >::get().


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