std::basic_regex の推論ガイド
From cppreference.com
< 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()); // uses explicit deduction guide }