Assignment operators
Synopses
Declared in <bslstl_string.h>
Copy‐assign from the specified rhs string.
basic_string&
operator=(basic_string const& rhs);
Assign a new value to this string.
basic_string&
operator=(CHAR_TYPE character);
Move‐assign from the specified rhs string and return *this.
basic_string&
operator=(BloombergLP::bslmf::MovableRef<basic_string> rhs) noexcept(/* see-below */);
Assign a new value to this string.
basic_string&
operator=(std::initializer_list<CHAR_TYPE> values);
Assign a new value to this string.
basic_string&
operator=(CHAR_TYPE const* rhs);
Assign to this string the value of the specified rhs object, and return a reference providing modifiable access to this string.
template<class STRING_VIEW_LIKE_TYPE>
basic_string&
operator=(STRING_VIEW_LIKE_TYPE const& rhs);
Assign to this string the value of the specified rhs string, and return a reference providing modifiable access to this string.
template<class ALLOC2>
basic_string&
operator=(std::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOC2> const& rhs);
Return Value
-
reference to this string
-
reference providing modifiable access to this string
Parameters
Name |
Description |
rhs |
string whose value is assigned |
character |
character value |
values |
initializer list of characters |
Created with MrDocs