diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:46 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:46 +0100 |
commit | 372a0e99c2f61543d9e14d9933b59d9d1f4cb26e (patch) | |
tree | bbadf39aed0610c8f8f7b41fefff47773b8ac205 /libcutl/cutl/details/boost/regex/v4/regex_replace.hpp | |
parent | 23d41842168ac1a1580111b9c5c73500ceee3d57 (diff) | |
parent | 4538829ab86b5a1cd4e845e7eab165029c9d6d46 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'libcutl/cutl/details/boost/regex/v4/regex_replace.hpp')
-rw-r--r-- | libcutl/cutl/details/boost/regex/v4/regex_replace.hpp | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/libcutl/cutl/details/boost/regex/v4/regex_replace.hpp b/libcutl/cutl/details/boost/regex/v4/regex_replace.hpp deleted file mode 100644 index 24867da..0000000 --- a/libcutl/cutl/details/boost/regex/v4/regex_replace.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * - * Copyright (c) 1998-2009 - * John Maddock - * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file - * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - * - */ - - /* - * LOCATION: see http://www.boost.org for most recent version. - * FILE regex_format.hpp - * VERSION see <cutl/details/boost/version.hpp> - * DESCRIPTION: Provides formatting output routines for search and replace - * operations. Note this is an internal header file included - * by regex.hpp, do not include on its own. - */ - -#ifndef BOOST_REGEX_V4_REGEX_REPLACE_HPP -#define BOOST_REGEX_V4_REGEX_REPLACE_HPP - - -namespace cutl_details_boost{ - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable: 4103) -#endif -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter> -OutputIterator regex_replace(OutputIterator out, - BidirectionalIterator first, - BidirectionalIterator last, - const basic_regex<charT, traits>& e, - Formatter fmt, - match_flag_type flags = match_default) -{ - regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags); - regex_iterator<BidirectionalIterator, charT, traits> j; - if(i == j) - { - if(!(flags & regex_constants::format_no_copy)) - out = re_detail::copy(first, last, out); - } - else - { - BidirectionalIterator last_m(first); - while(i != j) - { - if(!(flags & regex_constants::format_no_copy)) - out = re_detail::copy(i->prefix().first, i->prefix().second, out); - out = i->format(out, fmt, flags, e); - last_m = (*i)[0].second; - if(flags & regex_constants::format_first_only) - break; - ++i; - } - if(!(flags & regex_constants::format_no_copy)) - out = re_detail::copy(last_m, last, out); - } - return out; -} - -template <class traits, class charT, class Formatter> -std::basic_string<charT> regex_replace(const std::basic_string<charT>& s, - const basic_regex<charT, traits>& e, - Formatter fmt, - match_flag_type flags = match_default) -{ - std::basic_string<charT> result; - re_detail::string_out_iterator<std::basic_string<charT> > i(result); - regex_replace(i, s.begin(), s.end(), e, fmt, flags); - return result; -} - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable: 4103) -#endif -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -} // namespace cutl_details_boost - -#endif // BOOST_REGEX_V4_REGEX_REPLACE_HPP - - |