kblib 0.2.3
General utilities library for modern C++
kblib::containing_ptr< T > Struct Template Reference

A smart pointer to an object contained inside the smart pointer object. More...

#include <kblib/iterators.h>

Public Member Functions

constexpr auto operator* () noexcept -> T &
 Returns the contained object. More...
 
constexpr auto operator* () const noexcept -> const T &
 Returns the contained object. More...
 
constexpr auto operator-> () noexcept -> T *
 Return the address of the contained object. More...
 
constexpr auto operator-> () const noexcept -> const T *
 Return the address of the contained object. More...
 
constexpr auto get () noexcept -> T *
 Returns the address of the contained object. More...
 
constexpr auto get () const noexcept -> const T *
 Returns the address of the contained object. More...
 

Public Attributes

val
 

Detailed Description

template<typename T>
struct kblib::containing_ptr< T >

A smart pointer to an object contained inside the smart pointer object.

Definition at line 1109 of file iterators.h.

Member Function Documentation

◆ get() [1/2]

template<typename T >
constexpr auto kblib::containing_ptr< T >::get ( ) const -> const T*
inlineconstexprnoexcept

Returns the address of the contained object.

Definition at line 1135 of file iterators.h.

◆ get() [2/2]

template<typename T >
constexpr auto kblib::containing_ptr< T >::get ( ) -> T*
inlineconstexprnoexcept

Returns the address of the contained object.

Definition at line 1131 of file iterators.h.

◆ operator*() [1/2]

template<typename T >
constexpr auto kblib::containing_ptr< T >::operator* ( ) const -> const T&
inlineconstexprnoexcept

Returns the contained object.

Definition at line 1117 of file iterators.h.

◆ operator*() [2/2]

template<typename T >
constexpr auto kblib::containing_ptr< T >::operator* ( ) -> T&
inlineconstexprnoexcept

Returns the contained object.

Definition at line 1113 of file iterators.h.

◆ operator->() [1/2]

template<typename T >
constexpr auto kblib::containing_ptr< T >::operator-> ( ) const -> const T*
inlineconstexprnoexcept

Return the address of the contained object.

Definition at line 1126 of file iterators.h.

◆ operator->() [2/2]

template<typename T >
constexpr auto kblib::containing_ptr< T >::operator-> ( ) -> T*
inlineconstexprnoexcept

Return the address of the contained object.

Definition at line 1122 of file iterators.h.

Member Data Documentation

◆ val

template<typename T >
T kblib::containing_ptr< T >::val

Definition at line 1137 of file iterators.h.


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