std::basic_regex::operator=

定义于头文件 <regex>
basic_regex& operator=( const basic_regex& other );
(1) (C++11 起)
basic_regex& operator=( basic_regex&& other ) noexcept;
(2) (C++11 起)
basic_regex& operator=( const CharT* ptr );
(3) (C++11 起)
basic_regex& operator=( std::initializer_list<CharT> il );
(4) (C++11 起)
template< class ST, class SA >
basic_regex& operator=( const std::basic_string<CharT,ST,SA>& p );
(5) (C++11 起)

赋值内容。

1) 复制赋值运算符。赋值 other 的内容。等价于 assign(other);
2) 移动赋值运算符。用移动语义赋值 other 的内容。操作后 other 在合法但未指定的状态。等价于 assign(other);
3) 赋值 ptr 所指向的空终止字符串。等价于 assign(ptr);
4) 赋值 initializer_list il 中含有的字符。等价于 assign(il);
5) 赋值 string p 的内容。等价于 assign(p);

目录

参数

other - 另一 regex 对象
ptr - 指向空终止字符串的指针
il - 含要赋值的字符的 initializer_list
p - 含要赋值的字符的 string

返回值

*this

异常

1) (无)
3-5) (无)

参阅

赋值内容
(公开成员函数)

版本历史

  • (当前 | 先前 2017年9月28日 (四) 22:16Fruderica讨论 | 贡献. . (1,573字节) (-1,170). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 09:30P12bot讨论 | 贡献 . . (2,743字节) (-235). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 12:40P12bot讨论 | 贡献 . . (2,978字节) (+313). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月27日 (六) 09:06P12讨论 | 贡献 . . (2,665字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 06:00TranslationBot讨论 | 贡献. . (2,665字节) (-82). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月25日 (四) 15:32P12讨论 | 贡献 . . (2,747字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (2,747字节) (+2,747). . (Translated from the English version using Google Translate)