Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 064f557086.
PrevUpHomeNext
storage_ptr::storage_ptr (3 of 5 overloads)

Constructor.

Synopsis
template<
    class T>
storage_ptr(
    container::pmr::polymorphic_allocator< T > const& alloc);
Description

This constructs a non-owning pointer that points to the same memory resource as alloc, obtained by calling alloc.resource(). 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
Exception Safety

No-throw guarantee.

Parameters

Name

Description

alloc

A boost::container::pmr::polymorphic_allocator to construct from.


PrevUpHomeNext