deduction guides for
std::basic_regex
From ja.cppreference.net
<
cpp
|
regex
|
basic regex
|
ヘッダーで定義
<regex>
|
||
|
template
<
class
ForwardIt
>
basic_regex
(
ForwardIt, ForwardIt,
|
(C++17以降) | |
この deduction guide は std::basic_regex に対して提供されており、イテレータ範囲からの推論を可能にします。
例
このコードを実行
#include <regex> #include <vector> int main() { std::vector<char> v = {'a', 'b', 'c'}; std::basic_regex re(v.begin(), v.end()); // 明示的なデダクションガイドを使用 }