| Home | Libraries | People | FAQ | More

###### monotonic_resource::monotonic_resource (6 of 6 overloads)

Constructor.

###### Synopsis

    monotonic_resource(
        std::size_t initial_size = 1024,
        storage_ptr upstream = {});

###### Description

This constructs the resource and indicates that the first internal dynamic allocation shall be at least `initial_size` bytes.

This constructor is guaranteed not to perform any dynamic allocations.

###### Complexity

Constant.

###### Exception Safety

No-throw guarantee.

###### Parameters

Name | Description
--- | ---
`initial_size` | The size of the first internal dynamic allocation. If this is lower than the implementation-defined lower limit, then the lower limit is used instead.
`upstream` | An optional upstream memory resource to use for performing internal dynamic allocations. If this parameter is omitted, the default resource is used.