userver: userver/utils/checked_pointer.hpp File Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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 <cstdlib>
#include <userver/utils/assert.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