std::basic_regex<CharT,Traits>::assign
From cppreference.com
< cpp | regex | basic regex
| basic_regex& assign( const basic_regex& other ); |
(1) | (C++11以降) |
| basic_regex& assign( basic_regex&& other ) noexcept; |
(2) | (C++11以降) |
| basic_regex& assign( const CharT* s, flag_type f = std::regex_constants::ECMAScript ); |
(3) | (C++11以降) |
| basic_regex& assign( const CharT* ptr, std::size_t count, flag_type f = std::regex_constants::ECMAScript ); |
(4) | (C++11以降) |
| template< class ST, class SA > basic_regex& assign( const std::basic_string<CharT,ST,SA>& str, |
(5) | (C++11以降) |
| template< class InputIt > basic_regex& assign( InputIt first, InputIt last, |
(6) | (C++11以降) |
| basic_regex& assign( std::initializer_list<CharT> ilist, flag_type f = std::regex_constants::ECMAScript ); |
(7) | (C++11以降) |
正規表現の内容を代入します。
1) other の内容を代入します。flags() および mark_count() は、呼び出し後の other.flags() および other.mark_count() の値に等しくなります。
2) ムーブセマンティクスを使用して other の内容を代入します。flags() および mark_count() は、代入前の other.flags() および other.mark_count() の値に等しくなります。呼び出し後、other は有効ですが未規定の状態になります。
3) s が指すヌル終端文字列を代入します。
4) s が指す count 文字のシーケンスを代入します。
5) 文字列 str を代入します。
6) 範囲
[first, last) の文字を代入します。7) 初期化子リスト ilist の文字を代入します。
目次 |
[編集] Parameters
| その他 | - | 代入する別の正規表現 |
| s | - | 代入する文字シーケンスへのポインタ |
| str | - | 代入する文字列 |
| first, last | - | 代入する文字の範囲 |
| ilist | - | 代入する文字を含む初期化子リスト |
| 型要件 | ||
-InputIt は LegacyInputIterator の要件を満たす必要があります。 | ||
[編集] Return value
*this
[編集] Exceptions
1) 実装定義の例外を投げる可能性がある。
3-7) 提供された正規表現が無効な場合、std::regex_error。この場合、オブジェクトは変更されません。
[編集] Example
| このセクションは未完成です 理由: 例がありません |
[編集] See also
| 内容を代入する (public member function) |