std::basic_regex<CharT,Traits>::basic_regex_C++中文网

C++ 参考手册

位置:首页 > C++ 参考手册 >正则表达式库 >std::basic_regex > std::basic_regex<CharT,Traits>::basic_regex

从按照标志 f 转译的字符序列构造新的正则表达式。

1) 默认构造函数。构造将不匹配内容的空正则表达式。
2) 从空终止字符串 s 构造正则表达式。
3) 从 s 所指向的 count 个的字符序列构造正则表达式。
4) 复制构造函数。通过复制 other 构造正则表达式。
5) 移动构造函数。用移动语义构造拥有 other 内容的正则表达式。
6) 从 string str 构造正则表达式。
7) 范围构造函数。构造拥有范围 [first, last) 内容的正则表达式。
8) initializer_list 构造函数。构造拥有 initializer_list init 内容的正则表达式。

参数

异常

1) (无)
2-3) 若提供的正则表达式非法则为 std::regex_error 。
4) (无)
6-8) 若提供的正则表达式非法则为 std::regex_error 。