// file : libbutl/regex.ixx -*- C++ -*- // copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. { template inline std::pair, bool> regex_replace_search (const std::basic_string& s, const std::basic_regex& re, const std::basic_string& fmt, std::regex_constants::match_flag_type flags) { using namespace std; using it = typename basic_string::const_iterator; basic_string r; bool match (regex_replace_search (s, re, fmt, [&r] (it b, it e) {r.append (b, e);}, flags)); return make_pair (move (r), match); } }