storage_ptr::storage_ptr

Constructor.

Synopsis

storage_ptr() noexcept; (1)

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

template<
    class T>
storage_ptr(
    boost::container::pmr::polymorphic_allocator< T > const& alloc) noexcept; (3)

storage_ptr(
    storage_ptr&& other) noexcept; (4)

storage_ptr(
    storage_ptr const& other) noexcept; (5)

Description

This constructs a non-owning pointer that refers to the default memory resource.

Complexity

Constant.

Exception Safety

No-throw guarantee.

Parameters

Name Description

r

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

alloc

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

other

The pointer to construct from.