bsl::basic_string::operator=

Assignment operators

Synopses

Declared in <bslstl_string.h>

Copy-assign from the specified rhs string.

basic_string&
operator=(basic_string const& rhs);
» more...

Assign a new value to this string.

basic_string&
operator=(CHAR_TYPE character);
» more...

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

basic_string&
operator=(BloombergLP::bslmf::MovableRef<basic_string> rhs) noexcept(/* see-below */);
» more...

Assign a new value to this string.

basic_string&
operator=(std::initializer_list<CHAR_TYPE> values);
» more...

Assign a new value to this string.

basic_string&
operator=(CHAR_TYPE const* rhs);
» more...

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);
» more...

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);
» more...

Return Value

  • reference to this string
  • reference providing modifiable access to this string

Parameters

NameDescription
rhsstring whose value is assigned
charactercharacter value
valuesinitializer list of characters