throwing_ptr
Smart pointers that throw on dereference if null
Public Member Functions | List of all members
throwing::null_ptr_exception< T > Class Template Reference

Concrete class thrown upon dereferencing a null shared_ptr. More...

Inheritance diagram for throwing::null_ptr_exception< T >:
throwing::base_null_ptr_exception

Public Member Functions

virtual std::string what_type () const
 
- Public Member Functions inherited from throwing::base_null_ptr_exception
 base_null_ptr_exception ()
 

Detailed Description

template<typename T>
class throwing::null_ptr_exception< T >

Concrete class thrown upon dereferencing a null shared_ptr.

Use to catch dereferencing of specific types

Definition at line 32 of file null_ptr_exception.hpp.

Member Function Documentation

◆ what_type()

template<typename T >
virtual std::string throwing::null_ptr_exception< T >::what_type ( ) const
inlinevirtual

Reimplemented from throwing::base_null_ptr_exception.

Definition at line 34 of file null_ptr_exception.hpp.

34  {
35  std::string result("Dereferenced nullptr of type ");
36  result.append(typeid(T).name());
37  return result;
38  }

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