Zth (libzth)
zth::safe_ptr< T > Class Template Reference

Wrapper for a pointer, which checks validity of the pointer upon dereference. More...

#include <util.h>

Public Types

typedef safe_ptr type
 
typedef T pointer_type
 

Public Member Functions

constexpr safe_ptr (pointer_type *p) noexcept
 
constexpr operator pointer_type * () const noexcept
 
constexpr operator bool () const noexcept
 
constexpr pointer_typeoperator-> () const noexcept
 
constexpr pointer_typeoperator* () const noexcept
 

Protected Member Functions

constexpr pointer_typeptr () const noexcept
 

Detailed Description

template<typename T>
class zth::safe_ptr< T >

Wrapper for a pointer, which checks validity of the pointer upon dereference.

Definition at line 821 of file util.h.

Member Typedef Documentation

◆ pointer_type

template<typename T >
typedef T zth::safe_ptr< T >::pointer_type

Definition at line 824 of file util.h.

◆ type

template<typename T >
typedef safe_ptr zth::safe_ptr< T >::type

Definition at line 823 of file util.h.

Constructor & Destructor Documentation

◆ safe_ptr()

template<typename T >
constexpr zth::safe_ptr< T >::safe_ptr ( pointer_type p)
inlineconstexprnoexcept

Definition at line 827 of file util.h.

Member Function Documentation

◆ operator bool()

template<typename T >
constexpr zth::safe_ptr< T >::operator bool ( ) const
inlineconstexprnoexcept

Definition at line 836 of file util.h.

◆ operator pointer_type *()

template<typename T >
constexpr zth::safe_ptr< T >::operator pointer_type * ( ) const
inlineconstexprnoexcept

Definition at line 831 of file util.h.

◆ operator*()

template<typename T >
constexpr pointer_type& zth::safe_ptr< T >::operator* ( ) const
inlineconstexprnoexcept

Definition at line 847 of file util.h.

◆ operator->()

template<typename T >
constexpr pointer_type* zth::safe_ptr< T >::operator-> ( ) const
inlineconstexprnoexcept

Definition at line 841 of file util.h.

◆ ptr()

template<typename T >
constexpr pointer_type* zth::safe_ptr< T >::ptr ( ) const
inlineconstexprprotectednoexcept

Definition at line 855 of file util.h.


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