Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
storage_ptr::storage_ptr (2 of 5 overloads)

Constructor.

Synopsis
template<
    class T>
storage_ptr(
    T* r) noexcept;
Description

This constructs a non-owning pointer that points to the memory resource r. The caller is responsible for maintaining the lifetime of the pointed-to boost::container::pmr::memory_resource.

Constraints
std::is_convertible< T*, boost::container::pmr::memory_resource* >::value == true
Preconditions
r != nullptr
Exception Safety

No-throw guarantee.

Parameters

Name

Description

r

A pointer to the memory resource to use. This may not be null.


PrevUpHomeNext