From c09cd7512491cee1e82c1ad8128ce9fd4bc3f79b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Sep 2017 23:32:28 +0200 Subject: Initial modularization with both Clang and VC hacks Note: gave up on VC about half way though. --- libbutl/regex.hxx | 76 ------------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 libbutl/regex.hxx (limited to 'libbutl/regex.hxx') diff --git a/libbutl/regex.hxx b/libbutl/regex.hxx deleted file mode 100644 index 2105f05..0000000 --- a/libbutl/regex.hxx +++ /dev/null @@ -1,76 +0,0 @@ -// file : libbutl/regex.hxx -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef LIBBUTL_REGEX_HXX -#define LIBBUTL_REGEX_HXX - -#include -#include -#include // basic_string -#include // pair - -#include - -namespace butl -{ - // Call specified append() function for non-matched substrings and matched - // substring replacements returning true if search succeeded. The function - // must be callable with the following signature: - // - // void - // append(basic_string::iterator begin, basic_string::iterator end); - // - // The regex semantics is like that of std::regex_replace() extended the - // standard ECMA-262 substitution escape sequences with a subset of Perl - // sequences: - // - // \\, \u, \l, \U, \L, \E, \1, ..., \9 - // - // Notes and limitations: - // - // - The only valid regex_constants flags are match_default, - // format_first_only and format_no_copy. - // - // - If backslash doesn't start any of the listed sequences then it is - // silently dropped and the following character is copied as is. - // - // - The character case conversion is performed according to the global - // C++ locale (which is, unless changed, is the same as C locale and - // both default to the POSIX locale aka "C"). - // - template - bool - regex_replace_ex (const std::basic_string&, - const std::basic_regex&, - const std::basic_string& fmt, - F&& append, - std::regex_constants::match_flag_type = - std::regex_constants::match_default); - - // As above but concatenate non-matched substrings and matched substring - // replacements into a string returning it as well as whether the search - // succeeded. - // - template - std::pair, bool> - regex_replace_ex (const std::basic_string&, - const std::basic_regex&, - const std::basic_string& fmt, - std::regex_constants::match_flag_type = - std::regex_constants::match_default); -} - -namespace std -{ - // Print regex error description but only if it is meaningful (this is also - // why we have to print leading colon). - // - LIBBUTL_SYMEXPORT ostream& - operator<< (ostream&, const regex_error&); -} - -#include -#include - -#endif // LIBBUTL_REGEX_HXX -- cgit v1.1