std::basic_regex
的推导指引
< cpp | regex | basic regex
在标头
<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()}; // 使用显式推导指引 }