Namespaces
Variants
Views
Actions

std::basic_regex::operator=

From cppreference.com
< cpp‎ | regex‎ | basic regex
Revision as of 12:39, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <regex>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
basic_regex& operator=( const basic_regex& other );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
basic_regex& operator=( basic_regex&& other );
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
basic_regex& operator=( const CharT* ptr );
</td>

<td > (3) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
basic_regex& operator=( std::initializer_list<CharT> il );
</td>

<td > (4) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
template< class ST, class SA >
basic_regex& operator=( const std::basic_string<CharT,ST,SA>& p );
</td>

<td > (5) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Assigns the contents.

1) Copy assignment operator. Assigns the contents of other. Equivalent to assign(other);.
2) Move assignment operator. Assigns the contents of other using move semantics. other is in valid, but unspecified state after the operation. Equivalent to assign(other);.
3) Assigns a null-terminated character string pointed to by ptr. Equivalent to assign(ptr);.
4) Assigns characters contained in initializer list il. Equivalent to assign(il);.
5) Assigns the contents of the string p. Equivalent to assign(p);.

Contents

Parameters

other - another regex object
ptr - pointer to a null-terminated character string
il - initializer list containing characters to assign
p - string containing characters to assign

Return value

*this.

Exceptions

1) (none)
2)
noexcept specification:  
noexcept
  
3-5) (none)

See also

Template:cpp/regex/basic regex/dcl list assign