userver: userver/utils/checked_pointer.hpp File Reference
Loading...
Searching...
No Matches
checked_pointer.hpp File Reference

Detailed Description

Utility template for returning a pointer to an object that is owned by someone else; throws std::runtime_error if nullptr is stored.

Definition in file checked_pointer.hpp.

Go to the source code of this file.

#include <stdexcept>
#include <userver/utils/assert.hpp>
+ Include dependency graph for checked_pointer.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::CheckedPtr< T >
 Utility template for returning a pointer to an object that is owned by someone else; throws std::runtime_error if nullptr is stored. More...
 
class  utils::CheckedPtr< T & >
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename T >
constexpr CheckedPtr< T > utils::MakeCheckedPtr (T *ptr) noexcept