| Home | Libraries | People | FAQ | More

###### string::string (9 of 12 overloads)

Constructor.

<h7> Synopsis </h7>

    string(
        string const& other,
        storage_ptr sp);

<h7> Description </h7>

Construct the contents with a copy of `other`.

<h7> Complexity </h7>

Linear in `other.size()`.

<h7> Exception Safety </h7>

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

<h7> Parameters </h7>

Name | Description
--- | ---
`other` | The string to use as a source to copy from.
`sp` | An optional pointer to the `memory_resource` to use. The container will acquire shared ownership of the memory resource. The default argument for this parameter is `{}`.