string::string
Default constructor.
Synopsis
string(); (1)
string(
pilfered< string > other) noexcept; (2)
explicit
string(
storage_ptr sp); (3)
explicit
string(
std::size_t count,
char ch,
storage_ptr sp = {}); (4)
string(
char const* s,
storage_ptr sp = {}); (5)
explicit
string(
char const* s,
std::size_t count,
storage_ptr sp = {}); (6)
template<
class InputIt>
explicit
string(
InputIt first,
InputIt last,
storage_ptr sp = {}); (7)
explicit
string(
string const& other,
storage_ptr sp); (8)
explicit
string(
string&& other,
storage_ptr sp); (9)
string(
string_view s,
storage_ptr sp = {}); (10)
string(
string const& other); (11)
string(
string&& other) noexcept; (12)
Description
The string will have a zero size and a non-zero, unspecified capacity, using the default memory resource.
Complexity
Constant.
Template Parameters
Type | Description |
---|---|
|
The type of the iterators. |
Parameters
Name | Description |
---|---|
|
The value to pilfer. After pilfer construction, |
|
A pointer to the |
|
The size of the resulting string. |
|
The value to initialize characters of the string with. |
|
A pointer to a character string used to copy from. |
|
An input iterator pointing to the first character to insert, or pointing to the end of the range. |
|
An input iterator pointing to the end of the range. |
Exceptions
Type | Thrown On |
---|---|
|
|