std::basic_regex
的推导指引
类 | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
算法 | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
迭代器 | ||||
(C++11)
|
||||
(C++11)
|
||||
异常 | ||||
(C++11)
|
||||
特性 | ||||
(C++11)
|
||||
常量 | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
正则表达式文法 | ||||
(C++11)
|
在标头
<regex>
定义
|
||
template<class
ForwardIt>
basic_regex(ForwardIt,
ForwardIt, |
(C++17 起) | |
为 std::basic_regex 提供此推导指引 ,以允许从迭代器范围推导。
示例
#include <regex> #include <vector> int main() { std::vector<char> v = {'a', 'b', 'c'}; std::basic_regex re{v.begin(), v.end()}; // 使用显式推导指引 }