Assignment operators

Synopses

Declared in <bslstl_string.h>

Assign to this string the value of the string of length one consisting of the specified character, and return a reference providing modifiable access to this string.

basic_string<char>&
operator=(char character);

Move‐assign from the specified rhs string and return *this.

Assign to this string the value resulting from first clearing this string and then inserting (in order) each CHAR_TYPE object in the specified values initializer list.

basic_string<char>&
operator=(std::initializer_list<char> values);

Assign to this string the value of the specified rhs string, propagate to this object the allocator of rhs if the ALLOCATOR type has trait propagate_on_container_copy_assignment, and return a reference providing modifiable access to this string.

Assign to this string the value of the specified null‐terminated rhs string (of length CHAR_TRAITS::length(characterString)), and return a reference providing modifiable access to this string.

basic_string<char>&
operator=(char 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<char>&
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<char>&
operator=(std::basic_string<char, char_traits<char>, ALLOC2> const& rhs);

Created with MrDocs