From 95c579df686f115c0fd3697f2723fa73476c4584 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 23 Mar 2021 18:50:55 +0300 Subject: Add regex_replace_parse() overloads --- libbutl/regex.ixx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libbutl/regex.ixx') diff --git a/libbutl/regex.ixx b/libbutl/regex.ixx index dec15d1..805acd1 100644 --- a/libbutl/regex.ixx +++ b/libbutl/regex.ixx @@ -21,4 +21,21 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. return make_pair (move (r), match); } + + template + inline std::pair, std::basic_string> + regex_replace_parse (const std::basic_string& s, + std::regex_constants::syntax_option_type f) + { + return regex_replace_parse (s.c_str (), s.size (), f); + } + + template + inline std::pair, std::basic_string> + regex_replace_parse (const C* s, + std::regex_constants::syntax_option_type f) + { + return regex_replace_parse ( + s, std::basic_string::traits_type::length (s), f); + } } -- cgit v1.1