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 579430ad1f.
PrevUpHomeNext
array::array (5 of 11 overloads)

Constructor.

Synopsis
template<
    class InputIt>
array(
    InputIt first,
    InputIt last,
    storage_ptr sp = {});
Description

The array is constructed with the elements in the range {first, last), preserving order, using the specified memory resource.

Constraints
std::is_constructible_v<value, std::iterator_traits<InputIt>::reference>
Complexity

Linear in std::distance(first, last)

Exception Safety

Strong guarantee. Calls to memory_resource::allocate may throw.

Parameters

Name

Description

first

An input iterator pointing to the first element to insert, or pointing to the end of the range.

last

An input iterator pointing to the end of the range.

sp

A pointer to the boost::container::pmr::memory_resource to use. The container will acquire shared ownership of the memory resource.

Template Parameters

Type

Description

InputIt

a type satisfying the requirements of InputIterator.


PrevUpHomeNext