other versions
- Tumbleweed 2026.11.13-1.1
- Leap-16.0
- Leap-15.6
| deductionguidesforstd::basic_regex(3) | C++ Standard Libary | deductionguidesforstd::basic_regex(3) |
NAME¶
deductionguidesforstd::basic_regex - deductionguidesforstd::basic_regex
Synopsis¶
Defined in header <regex> template< class ForwardIt >
basic_regex( ForwardIt, ForwardIt, std::regex_constants::syntax_option_type = std::regex_constants::ECMAScript (since C++17) )
-> basic_regex<typename std::iterator_traits<ForwardIt>::value_type>;
This deduction guide is provided for std::basic_regex to allow deduction from an iterator range.
Example¶
// Run this code
#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
}
| 2026.11.10 | http://cppreference.com |