summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2025-08-29 11:40:52 +0300
committerrobot-contrib <[email protected]>2025-08-29 12:11:43 +0300
commitf3427d32290007ce56b94d35ab9505705354170d (patch)
tree084a503c05bfc8fbe66eca39c4246c51f04f0398
parenteb4fa69a58c58a2f36a4cda1b61972ad7037eee6 (diff)
Update contrib/restricted/boost/regex to 1.89.0
commit_hash:f11a2b7a06799366e6ecca5dc2173169637161b2
-rw-r--r--contrib/restricted/boost/regex/.yandex_meta/__init__.py2
-rw-r--r--contrib/restricted/boost/regex/.yandex_meta/default.nix4
-rw-r--r--contrib/restricted/boost/regex/.yandex_meta/devtools.copyrights.report18
-rw-r--r--contrib/restricted/boost/regex/.yandex_meta/devtools.licenses.report7
-rw-r--r--contrib/restricted/boost/regex/.yandex_meta/licenses.list.txt5
-rw-r--r--contrib/restricted/boost/regex/include/boost/cregex.hpp5
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/concepts.hpp53
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/config.hpp121
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/config/borland.hpp72
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/config/cwchar.hpp207
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/icu.hpp5
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/pattern_except.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/pending/object_cache.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/pending/static_mutex.hpp182
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/pending/unicode_iterator.hpp6
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/regex_traits.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/user.hpp14
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex.hpp80
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_creator.hpp87
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_parser.hpp23
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/c_regex_traits.hpp15
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/char_regex_traits.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/cpp_regex_traits.hpp19
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/cregex.hpp3
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/error_type.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/icu.hpp78
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/iterator_category.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/iterator_traits.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/match_flags.hpp76
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/match_results.hpp59
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/mem_block_cache.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/object_cache.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/pattern_except.hpp10
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp65
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_common.hpp27
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp21
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regbase.hpp6
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex.hpp12
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_format.hpp41
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_fwd.hpp18
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_grep.hpp14
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_iterator.hpp18
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_match.hpp17
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_merge.hpp8
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_raw_buffer.hpp3
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_replace.hpp8
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_search.hpp21
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_split.hpp9
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_token_iterator.hpp27
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits_defaults.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/regex_workaround.hpp2
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/states.hpp7
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/sub_match.hpp103
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/syntax_type.hpp126
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_iterator.hpp16
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_token_iterator.hpp12
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/unicode_iterator.hpp10
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/w32_regex_traits.hpp4
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex_fwd.hpp4
-rw-r--r--contrib/restricted/boost/regex/patches/allow-enum-indexing.patch26
-rw-r--r--contrib/restricted/boost/regex/src/internals.hpp35
-rw-r--r--contrib/restricted/boost/regex/src/regex.cpp120
-rw-r--r--contrib/restricted/boost/regex/src/regex_debug.cpp59
-rw-r--r--contrib/restricted/boost/regex/src/static_mutex.cpp189
-rw-r--r--contrib/restricted/boost/regex/src/wide_posix_api.cpp13
-rw-r--r--contrib/restricted/boost/regex/ya.make7
68 files changed, 802 insertions, 1433 deletions
diff --git a/contrib/restricted/boost/regex/.yandex_meta/__init__.py b/contrib/restricted/boost/regex/.yandex_meta/__init__.py
index afd28527b60..f107f66529c 100644
--- a/contrib/restricted/boost/regex/.yandex_meta/__init__.py
+++ b/contrib/restricted/boost/regex/.yandex_meta/__init__.py
@@ -32,7 +32,6 @@ boost_regex = NixSourceProject(
"include/boost/regex.h",
"include/boost/regex/*.hpp",
"include/boost/regex/v5",
- "include/boost/regex/config",
"include/boost/regex/pending",
"src/",
],
@@ -41,6 +40,7 @@ boost_regex = NixSourceProject(
"BOOST_REGEX_H2",
"BOOST_REGEX_H3",
"boost/core/",
+ "boost/regex/config/borland.hpp",
"boost/regex/v4/",
"boost/static_assert.hpp",
],
diff --git a/contrib/restricted/boost/regex/.yandex_meta/default.nix b/contrib/restricted/boost/regex/.yandex_meta/default.nix
index a5567f5159a..4bae59d0262 100644
--- a/contrib/restricted/boost/regex/.yandex_meta/default.nix
+++ b/contrib/restricted/boost/regex/.yandex_meta/default.nix
@@ -1,13 +1,13 @@
self: super: with self; {
boost_regex = stdenv.mkDerivation rec {
pname = "boost_regex";
- version = "1.88.0";
+ version = "1.89.0";
src = fetchFromGitHub {
owner = "boostorg";
repo = "regex";
rev = "boost-${version}";
- hash = "sha256-lUHGrMsA6q2scH4DKE49JmHhCpcrVtfR1T/5Tu9rQwI=";
+ hash = "sha256-sovIecm5wZw1ZiX2KiBE643MROAHC1f+SbthxpGW09Q=";
};
};
}
diff --git a/contrib/restricted/boost/regex/.yandex_meta/devtools.copyrights.report b/contrib/restricted/boost/regex/.yandex_meta/devtools.copyrights.report
index 87aebabfeac..598b505fd51 100644
--- a/contrib/restricted/boost/regex/.yandex_meta/devtools.copyrights.report
+++ b/contrib/restricted/boost/regex/.yandex_meta/devtools.copyrights.report
@@ -81,8 +81,6 @@ BELONGS ya.make
Match type : COPYRIGHT
Files with this license:
include/boost/regex/v5/basic_regex.hpp [3:4]
- src/regex.cpp [3:4]
- src/regex_debug.cpp [3:4]
KEEP COPYRIGHT_SERVICE_LABEL 4047300d625348707598991c59d561ac
BELONGS ya.make
@@ -110,7 +108,6 @@ BELONGS ya.make
include/boost/regex/concepts.hpp [3:4]
include/boost/regex/mfc.hpp [3:4]
include/boost/regex/pending/object_cache.hpp [3:4]
- include/boost/regex/pending/static_mutex.hpp [3:4]
include/boost/regex/v5/basic_regex_creator.hpp [3:4]
include/boost/regex/v5/basic_regex_parser.hpp [3:4]
include/boost/regex/v5/c_regex_traits.hpp [3:4]
@@ -120,19 +117,6 @@ BELONGS ya.make
include/boost/regex/v5/regex_traits_defaults.hpp [3:4]
include/boost/regex/v5/unicode_iterator.hpp [3:4]
include/boost/regex/v5/w32_regex_traits.hpp [3:4]
- src/static_mutex.cpp [3:4]
-
-KEEP COPYRIGHT_SERVICE_LABEL 6f522c25b81fd9005f9f0cdd69d03b25
-BELONGS ya.make
- License text:
- * Copyright (c) 2011
- * John Maddock
- Scancode info:
- Original SPDX id: COPYRIGHT_SERVICE_LABEL
- Score : 100.00
- Match type : COPYRIGHT
- Files with this license:
- src/internals.hpp [3:4]
KEEP COPYRIGHT_SERVICE_LABEL 81fe68c1eb5b189c68e4dea969fce3be
BELONGS ya.make
@@ -164,8 +148,6 @@ BELONGS ya.make
include/boost/cregex.hpp [3:4]
include/boost/regex.hpp [3:4]
include/boost/regex/config.hpp [3:4]
- include/boost/regex/config/borland.hpp [3:4]
- include/boost/regex/config/cwchar.hpp [3:4]
include/boost/regex/pattern_except.hpp [3:4]
include/boost/regex/regex_traits.hpp [3:4]
include/boost/regex/user.hpp [3:4]
diff --git a/contrib/restricted/boost/regex/.yandex_meta/devtools.licenses.report b/contrib/restricted/boost/regex/.yandex_meta/devtools.licenses.report
index 45b8ef2d5f7..af8e20d083a 100644
--- a/contrib/restricted/boost/regex/.yandex_meta/devtools.licenses.report
+++ b/contrib/restricted/boost/regex/.yandex_meta/devtools.licenses.report
@@ -81,13 +81,10 @@ BELONGS ya.make
include/boost/regex.h [6:8]
include/boost/regex.hpp [6:8]
include/boost/regex/concepts.hpp [6:8]
- include/boost/regex/config/borland.hpp [6:8]
- include/boost/regex/config/cwchar.hpp [6:8]
include/boost/regex/icu.hpp [6:8]
include/boost/regex/mfc.hpp [6:8]
include/boost/regex/pattern_except.hpp [6:8]
include/boost/regex/pending/object_cache.hpp [6:8]
- include/boost/regex/pending/static_mutex.hpp [6:8]
include/boost/regex/pending/unicode_iterator.hpp [6:8]
include/boost/regex/regex_traits.hpp [6:8]
include/boost/regex/user.hpp [6:8]
@@ -129,11 +126,7 @@ BELONGS ya.make
include/boost/regex/v5/unicode_iterator.hpp [6:8]
include/boost/regex/v5/w32_regex_traits.hpp [6:8]
include/boost/regex_fwd.hpp [6:8]
- src/internals.hpp [6:8]
src/posix_api.cpp [6:8]
- src/regex.cpp [6:8]
- src/regex_debug.cpp [6:8]
- src/static_mutex.cpp [6:8]
src/wide_posix_api.cpp [6:8]
KEEP BSL-1.0 c01de0902348b7c9494d50eaacc721eb
diff --git a/contrib/restricted/boost/regex/.yandex_meta/licenses.list.txt b/contrib/restricted/boost/regex/.yandex_meta/licenses.list.txt
index af800bb9bd5..28584ead442 100644
--- a/contrib/restricted/boost/regex/.yandex_meta/licenses.list.txt
+++ b/contrib/restricted/boost/regex/.yandex_meta/licenses.list.txt
@@ -67,10 +67,5 @@
====================COPYRIGHT====================
- * Copyright (c) 2011
- * John Maddock
-
-
-====================COPYRIGHT====================
* Copyright (c) 2020
* John Maddock
diff --git a/contrib/restricted/boost/regex/include/boost/cregex.hpp b/contrib/restricted/boost/regex/include/boost/cregex.hpp
index 7ad09e3f841..5313bad0e1b 100644
--- a/contrib/restricted/boost/regex/include/boost/cregex.hpp
+++ b/contrib/restricted/boost/regex/include/boost/cregex.hpp
@@ -14,7 +14,6 @@
* FILE cregex.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Declares POSIX API functions
- * + boost::RegEx high level wrapper.
*/
#ifndef BOOST_RE_CREGEX_HPP
@@ -24,11 +23,7 @@
#include <boost/regex/config.hpp>
#endif
-#ifdef BOOST_REGEX_CXX03
-#error #include <boost/regex/v4/cregex.hpp>
-#else
#include <boost/regex/v5/cregex.hpp>
-#endif
#endif /* include guard */
diff --git a/contrib/restricted/boost/regex/include/boost/regex.hpp b/contrib/restricted/boost/regex/include/boost/regex.hpp
index 37e0dfe3ef1..a36871479b7 100644
--- a/contrib/restricted/boost/regex/include/boost/regex.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex.hpp
@@ -28,11 +28,7 @@
#include <boost/regex/config.hpp>
#endif
-#ifdef BOOST_REGEX_CXX03
-#error #include <boost/regex/v4/regex.hpp>
-#else
#include <boost/regex/v5/regex.hpp>
-#endif
#endif // include
diff --git a/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp b/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp
index d2c96afad98..f5750a3184e 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp
@@ -24,7 +24,7 @@
#include <boost/type_traits/is_enum.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#error #include <boost/static_assert.hpp>
-#ifndef BOOST_TEST_TR1_REGEX
+#if !defined(BOOST_TEST_TR1_REGEX) && !defined(BOOST_REGEX_TEST_MODULE)
#include <boost/regex.hpp>
#endif
#include <bitset>
@@ -37,6 +37,16 @@
#define RW_NS std
#endif
+
+ //
+ // alter this to std::tr1, to test a std implementation:
+ //
+#ifndef BOOST_TEST_TR1_REGEX
+namespace global_regex_namespace = ::boost;
+#else
+namespace global_regex_namespace = ::std::tr1;
+#endif
+
namespace boost{
//
@@ -76,13 +86,10 @@ inline long hash_value(char_architype val)
//
} // namespace boost
namespace std{
- template<> struct char_traits<boost::char_architype>
- {
- // The intent is that this template is not instantiated,
- // but this typedef gives us a chance of compilation in
- // case it is:
- typedef boost::char_architype char_type;
- };
+ //
+ // We should never use this, if we do it should be an error:
+ //
+ template<> struct char_traits<boost::char_architype>;
}
//
// Allocator architype:
@@ -127,6 +134,9 @@ bool operator == (const allocator_architype<T>&, const allocator_architype<T>&)
template <class T>
bool operator != (const allocator_architype<T>&, const allocator_architype<T>&) { return false; }
+template <class T>
+void consume_type() {}
+
namespace boost{
//
// regex_traits_architype:
@@ -178,15 +188,6 @@ private:
regex_traits_architype& operator=(const regex_traits_architype&){ return *this; }
};
-//
-// alter this to std::tr1, to test a std implementation:
-//
-#ifndef BOOST_TEST_TR1_REGEX
-namespace global_regex_namespace = ::boost;
-#else
-namespace global_regex_namespace = ::std::tr1;
-#endif
-
template <class Bitmask>
struct BitmaskConcept
{
@@ -273,7 +274,7 @@ template <class Regex>
struct regex_traits_computer;
template <class charT, class traits>
-struct regex_traits_computer< global_regex_namespace::basic_regex<charT, traits> >
+struct regex_traits_computer< ::boost::basic_regex<charT, traits> >
{
typedef traits type;
};
@@ -371,6 +372,8 @@ struct BaseRegexConcept
e1 = except.code();
typedef typename Regex::value_type regex_value_type;
+ regex_value_type val{};
+ ignore_unused_variable_warning(val);
function_requires< RegexTraitsConcept<global_regex_namespace::regex_traits<char> > >();
function_requires< BaseRegexConcept<global_regex_namespace::basic_regex<char> > >();
}
@@ -407,6 +410,10 @@ struct BaseRegexConcept
Regex e5(in1, in2, m_flags);
ignore_unused_variable_warning(e5);
+ // equals:
+ e1 == e2;
+ e1 != e2;
+
// assign etc:
Regex e;
e = m_pointer;
@@ -446,15 +453,25 @@ struct BaseRegexConcept
// match_results tests - some typedefs are not used, however these
// guarante that they exist (some compilers may warn on non-usage)
typedef typename match_results_type::value_type mr_value_type;
+ consume_type<mr_value_type>();
typedef typename match_results_type::const_reference mr_const_reference;
+ consume_type<mr_const_reference>();
typedef typename match_results_type::reference mr_reference;
+ consume_type<mr_reference>();
typedef typename match_results_type::const_iterator mr_const_iterator;
+ consume_type<mr_const_iterator>();
typedef typename match_results_type::iterator mr_iterator;
+ consume_type<mr_iterator>();
typedef typename match_results_type::difference_type mr_difference_type;
+ consume_type<mr_difference_type>();
typedef typename match_results_type::size_type mr_size_type;
+ consume_type<mr_size_type>();
typedef typename match_results_type::allocator_type mr_allocator_type;
+ consume_type<mr_allocator_type>();
typedef typename match_results_type::char_type mr_char_type;
+ consume_type<mr_char_type>();
typedef typename match_results_type::string_type mr_string_type;
+ consume_type<mr_string_type>();
match_results_type m1;
mr_allocator_type at;
diff --git a/contrib/restricted/boost/regex/include/boost/regex/config.hpp b/contrib/restricted/boost/regex/include/boost/regex/config.hpp
index bed485fa120..d99721ebff0 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/config.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/config.hpp
@@ -19,12 +19,8 @@
#ifndef BOOST_REGEX_CONFIG_HPP
#define BOOST_REGEX_CONFIG_HPP
-#if !((__cplusplus >= 201103L) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) || defined(BOOST_REGEX_CXX03))
-# define BOOST_REGEX_CXX03
-#endif
-
-#if defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_CXX03)
-# define BOOST_REGEX_CXX03
+#if defined(BOOST_REGEX_RECURSIVE)
+#error "All support for the C++03 recursive engine has been removed, this define has no effect anymore."
#endif
#if defined(__has_include)
@@ -33,13 +29,22 @@
#endif
#endif
+#ifndef BOOST_REGEX_MODULE_EXPORT
+#define BOOST_REGEX_MODULE_EXPORT
+#define BOOST_REGEX_STATIC_CONST static const
+#else
+#define BOOST_REGEX_STATIC_CONST inline constexpr
+#define BOOST_REGEX_STANDALONE
+#endif
+
/*
* Borland C++ Fix/error check
* this has to go *before* we include any std lib headers:
*/
#if defined(__BORLANDC__) && !defined(__clang__)
-# include <boost/regex/config/borland.hpp>
+# error #include <boost/regex/config/borland.hpp>
#endif
+
#ifndef BOOST_REGEX_STANDALONE
#include <boost/version.hpp>
#endif
@@ -51,9 +56,13 @@
*************************************************************************/
#ifdef BOOST_REGEX_STANDALONE
+#ifndef BOOST_REGEX_AS_MODULE
#include <cassert>
# define BOOST_REGEX_ASSERT(x) assert(x)
#else
+# define BOOST_REGEX_ASSERT(x) do{ if(x == 0) { std::printf("%s:%d Assertion Failed", __FILE__, __LINE__); std::abort(); } }while(0)
+#endif
+#else
#include <boost/assert.hpp>
# define BOOST_REGEX_ASSERT(x) BOOST_ASSERT(x)
#endif
@@ -90,20 +99,7 @@
# endif
#endif
-
-/****************************************************************************
-*
-* Legacy support:
-*
-*******************************************************************************/
-
-#if defined(BOOST_NO_STD_LOCALE) || defined(BOOST_NO_CXX11_HDR_MUTEX) || defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) \
- || defined(BOOST_NO_CXX11_HDR_ATOMIC) || defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_CXX11_SMART_PTR) \
- || defined(BOOST_NO_CXX11_STATIC_ASSERT) || defined(BOOST_NO_NOEXCEPT)
-#ifndef BOOST_REGEX_CXX03
-# define BOOST_REGEX_CXX03
-#endif
-#endif
+#define BOOST_REGEX_MAX_RECURSION_DEPTH 100
/*****************************************************************************
*
@@ -112,7 +108,7 @@
****************************************************************************/
/* Obsolete macro, use BOOST_VERSION instead: */
-#define BOOST_RE_VERSION 500
+#define BOOST_RE_VERSION 600
/* fix: */
#if defined(_UNICODE) && !defined(UNICODE)
@@ -158,40 +154,6 @@
#define BOOST_REGEX_DETAIL_NS BOOST_REGEX_JOIN(re_detail_, BOOST_RE_VERSION)
/*
- * Fix for gcc prior to 3.4: std::ctype<wchar_t> doesn't allow
- * masks to be combined, for example:
- * std::use_facet<std::ctype<wchar_t> >.is(std::ctype_base::lower|std::ctype_base::upper, L'a');
- * returns *false*.
- */
-#if defined(__GLIBCPP__) && defined(BOOST_REGEX_CXX03)
-# define BOOST_REGEX_BUGGY_CTYPE_FACET
-#endif
-
-/*
- * If there isn't good enough wide character support then there will
- * be no wide character regular expressions:
- */
-#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
-# if !defined(BOOST_NO_WREGEX)
-# define BOOST_NO_WREGEX
-# endif
-#else
-# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
- /* STLPort on IRIX is misconfigured: <cwctype> does not compile
- * as a temporary fix include <wctype.h> instead and prevent inclusion
- * of STLPort version of <cwctype> */
-# include <wctype.h>
-# define __STLPORT_CWCTYPE
-# define _STLP_CWCTYPE
-# endif
-
-#if defined(__cplusplus) && defined(BOOST_REGEX_CXX03)
-# include <boost/regex/config/cwchar.hpp>
-#endif
-
-#endif
-
-/*
* If Win32 support has been disabled for boost in general, then
* it is for regex in particular:
*/
@@ -251,19 +213,6 @@
# define BOOST_REGEX_DECL
#endif
-#ifdef BOOST_REGEX_CXX03
-#if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
-# define BOOST_LIB_NAME boost_regex
-# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
-# define BOOST_DYN_LINK
-# endif
-# ifdef BOOST_REGEX_DIAG
-# define BOOST_LIB_DIAGNOSTIC
-# endif
-# include <boost/config/auto_link.hpp>
-#endif
-#endif
-
/*****************************************************************************
*
* Set up function call type:
@@ -355,18 +304,7 @@
* If there are no exceptions then we must report critical-errors
* the only way we know how; by terminating.
*/
-#include <stdexcept>
-#include <string>
-#include <boost/throw_exception.hpp>
-
-# define BOOST_REGEX_NOEH_ASSERT(x)\
-if(0 == (x))\
-{\
- std::string s("Error: critical regex++ failure in: ");\
- s.append(#x);\
- std::runtime_error e(s);\
- boost::throw_exception(e);\
-}
+# define BOOST_REGEX_NOEH_ASSERT(x) assert(x);
#else
/*
* With exceptions then error handling is taken care of and
@@ -405,26 +343,6 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
#endif
-
-/*****************************************************************************
- *
- * Algorithm selection and configuration.
- * These options are now obsolete for C++11 and later (regex v5).
- *
- ****************************************************************************/
-
-#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
-# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(_MSC_VER) && (_MSC_VER >= 1400)) && defined(BOOST_REGEX_CXX03)
-# define BOOST_REGEX_RECURSIVE
-# else
-# define BOOST_REGEX_NON_RECURSIVE
-# endif
-#endif
-
-#ifdef BOOST_REGEX_NON_RECURSIVE
-# ifdef BOOST_REGEX_RECURSIVE
-# error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
-# endif
# ifndef BOOST_REGEX_BLOCKSIZE
# define BOOST_REGEX_BLOCKSIZE 4096
# endif
@@ -440,7 +358,6 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
# ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
# define BOOST_REGEX_MAX_CACHE_BLOCKS 16
# endif
-#endif
/*****************************************************************************
diff --git a/contrib/restricted/boost/regex/include/boost/regex/config/borland.hpp b/contrib/restricted/boost/regex/include/boost/regex/config/borland.hpp
deleted file mode 100644
index 981113e5cf1..00000000000
--- a/contrib/restricted/boost/regex/include/boost/regex/config/borland.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * 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 boost/regex/config/borland.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: regex borland-specific config setup.
- */
-
-
-#if defined(__BORLANDC__) && !defined(__clang__)
-# if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
- // problems with std::basic_string and dll RTL:
-# if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
-# ifdef BOOST_REGEX_BUILD_DLL
-# error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
-# else
-# pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!")
-# endif
-# endif
-# ifndef _RTLDLL
- // this is harmless for a staic link:
-# define _RWSTD_COMPILE_INSTANTIATE
-# endif
- // external templates cause problems for some reason:
-# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-# endif
-# if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL)
- // C++ Builder 4 and earlier, we can't tell whether we should be using
- // the VCL runtime or not, do a static link instead:
-# define BOOST_REGEX_STATIC_LINK
-# endif
- //
- // VCL support:
- // if we're building a console app then there can't be any VCL (can there?)
-# if !defined(__CONSOLE__) && !defined(_NO_VCL)
-# define BOOST_REGEX_USE_VCL
-# endif
- //
- // if this isn't Win32 then don't automatically select link
- // libraries:
- //
-# ifndef _Windows
-# ifndef BOOST_REGEX_NO_LIB
-# define BOOST_REGEX_NO_LIB
-# endif
-# ifndef BOOST_REGEX_STATIC_LINK
-# define BOOST_REGEX_STATIC_LINK
-# endif
-# endif
-
-#if __BORLANDC__ < 0x600
-//
-// string workarounds:
-//
-#include <cstring>
-#undef strcmp
-#undef strcpy
-#endif
-
-#endif
-
-
diff --git a/contrib/restricted/boost/regex/include/boost/regex/config/cwchar.hpp b/contrib/restricted/boost/regex/include/boost/regex/config/cwchar.hpp
deleted file mode 100644
index a55089d0ab4..00000000000
--- a/contrib/restricted/boost/regex/include/boost/regex/config/cwchar.hpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * 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 boost/regex/config/cwchar.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: regex wide character string fixes.
- */
-
-#ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP
-#define BOOST_REGEX_CONFIG_CWCHAR_HPP
-
-#include <cwchar>
-#include <cwctype>
-#include <boost/config.hpp>
-
-#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
-// apparently this is required for the RW STL on Linux:
-#undef iswalnum
-#undef iswalpha
-#undef iswblank
-#undef iswcntrl
-#undef iswdigit
-#undef iswgraph
-#undef iswlower
-#undef iswprint
-#undef iswprint
-#undef iswpunct
-#undef iswspace
-#undef iswupper
-#undef iswxdigit
-#undef iswctype
-#undef towlower
-#undef towupper
-#undef towctrans
-#undef wctrans
-#undef wctype
-#endif
-
-namespace std{
-
-#ifndef BOOST_NO_STDC_NAMESPACE
-extern "C"{
-#endif
-
-#ifdef iswalnum
-inline int (iswalnum)(wint_t i)
-{ return iswalnum(i); }
-#undef iswalnum
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswalnum;
-#endif
-
-#ifdef iswalpha
-inline int (iswalpha)(wint_t i)
-{ return iswalpha(i); }
-#undef iswalpha
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswalpha;
-#endif
-
-#ifdef iswcntrl
-inline int (iswcntrl)(wint_t i)
-{ return iswcntrl(i); }
-#undef iswcntrl
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswcntrl;
-#endif
-
-#ifdef iswdigit
-inline int (iswdigit)(wint_t i)
-{ return iswdigit(i); }
-#undef iswdigit
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswdigit;
-#endif
-
-#ifdef iswgraph
-inline int (iswgraph)(wint_t i)
-{ return iswgraph(i); }
-#undef iswgraph
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswgraph;
-#endif
-
-#ifdef iswlower
-inline int (iswlower)(wint_t i)
-{ return iswlower(i); }
-#undef iswlower
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswlower;
-#endif
-
-#ifdef iswprint
-inline int (iswprint)(wint_t i)
-{ return iswprint(i); }
-#undef iswprint
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswprint;
-#endif
-
-#ifdef iswpunct
-inline int (iswpunct)(wint_t i)
-{ return iswpunct(i); }
-#undef iswpunct
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswpunct;
-#endif
-
-#ifdef iswspace
-inline int (iswspace)(wint_t i)
-{ return iswspace(i); }
-#undef iswspace
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswspace;
-#endif
-
-#ifdef iswupper
-inline int (iswupper)(wint_t i)
-{ return iswupper(i); }
-#undef iswupper
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswupper;
-#endif
-
-#ifdef iswxdigit
-inline int (iswxdigit)(wint_t i)
-{ return iswxdigit(i); }
-#undef iswxdigit
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::iswxdigit;
-#endif
-
-#ifdef towlower
-inline wint_t (towlower)(wint_t i)
-{ return towlower(i); }
-#undef towlower
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::towlower;
-#endif
-
-#ifdef towupper
-inline wint_t (towupper)(wint_t i)
-{ return towupper(i); }
-#undef towupper
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using :: towupper;
-#endif
-
-#ifdef wcscmp
-inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2)
-{ return wcscmp(p1,p2); }
-#undef wcscmp
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::wcscmp;
-#endif
-
-#ifdef wcscoll
-inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2)
-{ return wcscoll(p1,p2); }
-#undef wcscoll
-#elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(UNDER_CE)
-using ::wcscoll;
-#endif
-
-#ifdef wcscpy
-inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2)
-{ return wcscpy(p1,p2); }
-#undef wcscpy
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::wcscpy;
-#endif
-
-#ifdef wcslen
-inline size_t (wcslen)(const wchar_t *p)
-{ return wcslen(p); }
-#undef wcslen
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::wcslen;
-#endif
-
-#ifdef wcsxfrm
-size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s)
-{ return wcsxfrm(p1,p2,s); }
-#undef wcsxfrm
-#elif defined(BOOST_NO_STDC_NAMESPACE)
-using ::wcsxfrm;
-#endif
-
-
-#ifndef BOOST_NO_STDC_NAMESPACE
-} // extern "C"
-#endif
-
-} // namespace std
-
-#endif
-
diff --git a/contrib/restricted/boost/regex/include/boost/regex/icu.hpp b/contrib/restricted/boost/regex/include/boost/regex/icu.hpp
index 601717d1c72..d01e61b86f1 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/icu.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/icu.hpp
@@ -20,11 +20,6 @@
#define BOOST_REGEX_ICU_HPP
#include <boost/regex/config.hpp>
-
-#ifdef BOOST_REGEX_CXX03
-#error #include <boost/regex/v4/icu.hpp>
-#else
#include <boost/regex/v5/icu.hpp>
-#endif
#endif
diff --git a/contrib/restricted/boost/regex/include/boost/regex/pattern_except.hpp b/contrib/restricted/boost/regex/include/boost/regex/pattern_except.hpp
index 59c0d399c16..78e9abb62f4 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/pattern_except.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/pattern_except.hpp
@@ -23,10 +23,6 @@
#include <boost/regex/config.hpp>
#endif
-#ifdef BOOST_REGEX_CXX03
-#error #include <boost/regex/v4/pattern_except.hpp>
-#else
#include <boost/regex/v5/pattern_except.hpp>
-#endif
#endif
diff --git a/contrib/restricted/boost/regex/include/boost/regex/pending/object_cache.hpp b/contrib/restricted/boost/regex/include/boost/regex/pending/object_cache.hpp
index 271cb2c36fd..3ca451ef628 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/pending/object_cache.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/pending/object_cache.hpp
@@ -20,10 +20,6 @@
#define BOOST_REGEX_OBJECT_CACHE_HPP
#include <boost/regex/config.hpp>
-#ifdef BOOST_REGEX_CXX03
-#error #include <boost/regex/v4/object_cache.hpp>
-#else
#include <boost/regex/v5/object_cache.hpp>
-#endif
#endif
diff --git a/contrib/restricted/boost/regex/include/boost/regex/pending/static_mutex.hpp b/contrib/restricted/boost/regex/include/boost/regex/pending/static_mutex.hpp
deleted file mode 100644
index 953a037a094..00000000000
--- a/contrib/restricted/boost/regex/include/boost/regex/pending/static_mutex.hpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * 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 static_mutex.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares static_mutex lock type, there are three different
- * implementations: POSIX pthreads, WIN32 threads, and portable,
- * these are described in more detail below.
- */
-
-#ifndef BOOST_REGEX_STATIC_MUTEX_HPP
-#define BOOST_REGEX_STATIC_MUTEX_HPP
-
-#include <boost/config.hpp>
-#include <boost/regex/config.hpp> // dll import/export options.
-
-#ifdef BOOST_HAS_PTHREADS
-#include <pthread.h>
-#endif
-
-#if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER)
-//
-// pthreads version:
-// simple wrap around a pthread_mutex_t initialized with
-// PTHREAD_MUTEX_INITIALIZER.
-//
-namespace boost{
-
-class static_mutex;
-
-#define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, }
-
-class BOOST_REGEX_DECL scoped_static_mutex_lock
-{
-public:
- scoped_static_mutex_lock(static_mutex& mut, bool lk = true);
- ~scoped_static_mutex_lock();
- inline bool locked()const
- {
- return m_have_lock;
- }
- inline operator void const*()const
- {
- return locked() ? this : 0;
- }
- void lock();
- void unlock();
-private:
- static_mutex& m_mutex;
- bool m_have_lock;
-};
-
-class static_mutex
-{
-public:
- typedef scoped_static_mutex_lock scoped_lock;
- pthread_mutex_t m_mutex;
-};
-
-} // namespace boost
-#elif defined(BOOST_HAS_WINTHREADS)
-//
-// Win32 version:
-// Use a 32-bit int as a lock, along with a test-and-set
-// implementation using InterlockedCompareExchange.
-//
-
-#include <boost/cstdint.hpp>
-
-namespace boost{
-
-class BOOST_REGEX_DECL scoped_static_mutex_lock;
-
-class static_mutex
-{
-public:
- typedef scoped_static_mutex_lock scoped_lock;
- boost::int32_t m_mutex;
-};
-
-#define BOOST_STATIC_MUTEX_INIT { 0, }
-
-class BOOST_REGEX_DECL scoped_static_mutex_lock
-{
-public:
- scoped_static_mutex_lock(static_mutex& mut, bool lk = true);
- ~scoped_static_mutex_lock();
- operator void const*()const
- {
- return locked() ? this : 0;
- }
- bool locked()const
- {
- return m_have_lock;
- }
- void lock();
- void unlock();
-private:
- static_mutex& m_mutex;
- bool m_have_lock;
- scoped_static_mutex_lock(const scoped_static_mutex_lock&);
- scoped_static_mutex_lock& operator=(const scoped_static_mutex_lock&);
-};
-
-} // namespace
-
-#else
-//
-// Portable version of a static mutex based on Boost.Thread library:
-// This has to use a single mutex shared by all instances of static_mutex
-// because boost::call_once doesn't alow us to pass instance information
-// down to the initialisation proceedure. In fact the initialisation routine
-// may need to be called more than once - but only once per instance.
-//
-// Since this preprocessor path is almost never taken, we hide these header
-// dependencies so that build tools don't find them.
-//
-#define BOOST_REGEX_H1 <boost/thread/once.hpp>
-#define BOOST_REGEX_H2 <boost/thread/recursive_mutex.hpp>
-#define BOOST_REGEX_H3 <boost/thread/lock_types.hpp>
-#error #include BOOST_REGEX_H1
-#error #include BOOST_REGEX_H2
-#error #include BOOST_REGEX_H3
-#undef BOOST_REGEX_H1
-#undef BOOST_REGEX_H2
-#undef BOOST_REGEX_H3
-
-namespace boost{
-
-class BOOST_REGEX_DECL scoped_static_mutex_lock;
-extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex();
-
-class BOOST_REGEX_DECL static_mutex
-{
-public:
- typedef scoped_static_mutex_lock scoped_lock;
- static void init();
- static boost::recursive_mutex* m_pmutex;
- static boost::once_flag m_once;
-};
-
-#define BOOST_STATIC_MUTEX_INIT { }
-
-class BOOST_REGEX_DECL scoped_static_mutex_lock
-{
-public:
- scoped_static_mutex_lock(static_mutex& mut, bool lk = true);
- ~scoped_static_mutex_lock();
- operator void const*()const;
- bool locked()const;
- void lock();
- void unlock();
-private:
- boost::unique_lock<boost::recursive_mutex>* m_plock;
- bool m_have_lock;
-};
-
-inline scoped_static_mutex_lock::operator void const*()const
-{
- return locked() ? this : 0;
-}
-
-inline bool scoped_static_mutex_lock::locked()const
-{
- return m_have_lock;
-}
-
-} // namespace
-
-#endif
-
-#endif
diff --git a/contrib/restricted/boost/regex/include/boost/regex/pending/unicode_iterator.hpp b/contrib/restricted/boost/regex/include/boost/regex/pending/unicode_iterator.hpp
index c5b4200e0e2..da36ecb53b8 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/pending/unicode_iterator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/pending/unicode_iterator.hpp
@@ -20,13 +20,7 @@
#define BOOST_REGEX_PENDING_UNICODE_ITERATOR_HPP
#include <boost/regex/config.hpp>
-
-#if defined(BOOST_REGEX_CXX03)
-#error #include <boost/regex/v4/unicode_iterator.hpp>
-#else
#include <boost/regex/v5/unicode_iterator.hpp>
-#endif
-
#endif // BOOST_REGEX_PENDING_UNICODE_ITERATOR_HPP
diff --git a/contrib/restricted/boost/regex/include/boost/regex/regex_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/regex_traits.hpp
index e66284c6cdf..fb25b600968 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/regex_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/regex_traits.hpp
@@ -24,11 +24,7 @@
#endif
# ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
-#ifdef BOOST_REGEX_CXX03
-# error #include <boost/regex/v4/regex_traits.hpp>
-#else
# include <boost/regex/v5/regex_traits.hpp>
-#endif
# endif
#endif // include
diff --git a/contrib/restricted/boost/regex/include/boost/regex/user.hpp b/contrib/restricted/boost/regex/include/boost/regex/user.hpp
index 4b159bc581b..8e047dcdf84 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/user.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/user.hpp
@@ -59,16 +59,6 @@
// exception handling.
// #define BOOST_REGEX_HAS_MS_STACK_GUARD
-// define this if you want to use the recursive algorithm
-// even if BOOST_REGEX_HAS_MS_STACK_GUARD is not defined.
-// NOTE: OBSOLETE!!
-// #define BOOST_REGEX_RECURSIVE
-
-// define this if you want to use the non-recursive
-// algorithm, even if the recursive version would be the default.
-// NOTE: OBSOLETE!!
-// #define BOOST_REGEX_NON_RECURSIVE
-
// define this if you want to set the size of the memory blocks
// used by the non-recursive algorithm.
// #define BOOST_REGEX_BLOCKSIZE 4096
@@ -93,3 +83,7 @@
// define this if you want regex to use __cdecl calling convensions, even when __fastcall is available:
// #define BOOST_REGEX_NO_FASTCALL
+
+// define this to control how deep non-avoidable recursive function calls can go, typical expressions
+// and format strings should only recurse a handful of times, this is mainly to prevent DOS type attacks.
+// #define BOOST_REGEX_MAX_RECURSION_DEPTH 100
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex.hpp
index 5c73775f067..311187d5483 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex.hpp
@@ -19,7 +19,18 @@
#ifndef BOOST_REGEX_V5_BASIC_REGEX_HPP
#define BOOST_REGEX_V5_BASIC_REGEX_HPP
+#include <boost/regex/v5/regbase.hpp>
+#include <boost/regex/v5/syntax_type.hpp>
+#include <boost/regex/v5/regex_traits.hpp>
+#include <boost/regex/v5/states.hpp>
+#include <boost/regex/v5/regex_raw_buffer.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
+#include <algorithm>
+#include <limits>
+#include <memory>
#include <vector>
+#endif
namespace boost{
#ifdef BOOST_REGEX_MSVC
@@ -58,7 +69,12 @@ void bubble_down_one(I first, I last)
}
}
-static const int hash_value_mask = 1 << (std::numeric_limits<int>::digits - 1);
+#ifndef BOOST_REGEX_AS_MODULE
+static
+#else
+inline
+#endif
+const int hash_value_mask = 1 << (std::numeric_limits<int>::digits - 1);
template <class Iterator>
inline int hash_value_from_capture_name(Iterator i, Iterator j)
@@ -306,7 +322,7 @@ public:
// represents the compiled
// regular expression:
//
-
+BOOST_REGEX_MODULE_EXPORT
#ifdef BOOST_REGEX_NO_FWD
template <class charT, class traits = regex_traits<charT> >
#else
@@ -488,7 +504,7 @@ public:
}
//
// swap:
- void swap(basic_regex& that)throw()
+ void swap(basic_regex& that)noexcept
{
m_pimpl.swap(that.m_pimpl);
}
@@ -533,7 +549,21 @@ public:
return status() - that.status();
if(flags() != that.flags())
return flags() - that.flags();
- return str().compare(that.str());
+
+ const char_type* i = m_pimpl->begin();
+ const char_type* j = that.m_pimpl->begin();
+ while ((i != m_pimpl->end()) && (j != that.m_pimpl->end()))
+ {
+ if (*i != *j)
+ return *i < *j ? -1 : 1;
+ ++i;
+ ++j;
+ }
+ if (i != m_pimpl->end())
+ return *i > static_cast<char_type>(0) ? 1 : -1;
+ if (j != that.m_pimpl->end())
+ return *j > static_cast<char_type>(0) ? -1 : 1;
+ return 0;
}
bool operator==(const basic_regex& e)const
{
@@ -629,22 +659,38 @@ private:
// and are designed to provide the strong exception guarantee
// (in the event of a throw, the state of the object remains unchanged).
//
+
+namespace detail
+{
+ template <class charT, class F, class Traits>
+ std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, Traits> > create_implemenation(const charT* p1, const charT* p2, F f, std::shared_ptr<boost::regex_traits_wrapper<Traits> > ptraits)
+ {
+ std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, Traits> > result;
+ if (!ptraits.get())
+ {
+ result = std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, Traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, Traits>());
+ }
+ else
+ {
+ result = std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, Traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, Traits>(ptraits));
+ }
+ result->assign(p1, p2, f);
+ return result;
+ }
+#ifdef BOOST_REGEX_AS_MODULE
+ std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<char, basic_regex<char>::traits_type> >
+ create_implemenation(const char* p1, const char* p2, basic_regex<char>::flag_type f, std::shared_ptr<boost::regex_traits_wrapper<basic_regex<char>::traits_type> > ptraits);
+ std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<wchar_t, basic_regex<wchar_t>::traits_type> >
+ create_implemenation(const wchar_t* p1, const wchar_t* p2, basic_regex<wchar_t>::flag_type f, std::shared_ptr<boost::regex_traits_wrapper<basic_regex<wchar_t>::traits_type> > ptraits);
+#endif
+}
+
template <class charT, class traits>
basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p1,
const charT* p2,
flag_type f)
{
- std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > temp;
- if(!m_pimpl.get())
- {
- temp = std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>());
- }
- else
- {
- temp = std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
- }
- temp->assign(p1, p2, f);
- temp.swap(m_pimpl);
+ m_pimpl = detail::create_implemenation(p1, p2, f, m_pimpl.get() ? m_pimpl->m_ptraits : std::shared_ptr<boost::regex_traits_wrapper<traits> >());
return *this;
}
@@ -660,13 +706,13 @@ typename basic_regex<charT, traits>::locale_type basic_regex<charT, traits>::im
//
// non-members:
//
-template <class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits>
void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2)
{
e1.swap(e2);
}
-template <class charT, class traits, class traits2>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class traits2>
std::basic_ostream<charT, traits>&
operator << (std::basic_ostream<charT, traits>& os,
const basic_regex<charT, traits2>& e)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_creator.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_creator.hpp
index bb76c7c1f23..a8a1a1dcaea 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_creator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_creator.hpp
@@ -28,7 +28,12 @@
#endif
#endif
+#include <boost/regex/v5/basic_regex.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
+#include <vector>
#include <set>
+#endif
namespace boost{
@@ -217,8 +222,10 @@ public:
m_icase = static_cast<bool>(f & regbase::icase);
}
}
- re_syntax_base* append_state(syntax_element_type t, std::size_t s = sizeof(re_syntax_base));
- re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s = sizeof(re_syntax_base));
+ re_syntax_base* append_state(syntax_element_type t, std::size_t s);
+ re_syntax_base* append_state(syntax_element_type t) { return append_state(t, sizeof(re_syntax_base)); }
+ re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s);
+ re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t) { return insert_state(pos, t, sizeof(re_syntax_base)); }
re_literal* append_literal(charT c);
re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set);
re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set, std::integral_constant<bool, false>*);
@@ -248,7 +255,7 @@ private:
void fixup_recursions(re_syntax_base* state);
void create_startmaps(re_syntax_base* state);
int calculate_backstep(re_syntax_base* state);
- void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask);
+ void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask, unsigned recursion_count = 0);
unsigned get_restart_type(re_syntax_base* state);
void set_all_masks(unsigned char* bits, unsigned char);
bool is_bad_repeat(re_syntax_base* pt);
@@ -971,7 +978,12 @@ template <class charT, class traits>
int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state)
{
typedef typename traits::char_class_type m_type;
+
int result = 0;
+ int last_alternative_result = -1;
+
+ std::vector<std::tuple<int, re_syntax_base*>> stack;
+
while(state)
{
switch(state->type)
@@ -990,9 +1002,28 @@ int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state
}
break;
case syntax_element_endmark:
- if((static_cast<re_brace*>(state)->index == -1)
+ if ((static_cast<re_brace*>(state)->index == -1)
|| (static_cast<re_brace*>(state)->index == -2))
- return result;
+ {
+ // We've finished the calculation, check against any previous alternatives:
+ if (last_alternative_result >= 0)
+ {
+ if (last_alternative_result != result)
+ return -1;
+ }
+ else
+ last_alternative_result = result;
+
+ if (stack.size())
+ {
+ // Skip to next alternative and calculate that as well:
+ std::tie(result, state) = stack.back();
+ stack.pop_back();
+ continue;
+ }
+ else
+ return result;
+ }
break;
case syntax_element_literal:
result += static_cast<re_literal*>(state)->length;
@@ -1048,11 +1079,13 @@ int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state
continue;
case syntax_element_alt:
{
- int r1 = calculate_backstep(state->next.p);
- int r2 = calculate_backstep(static_cast<re_alt*>(state)->alt.p);
- if((r1 < 0) || (r1 != r2))
+ // Push the alternative if we haven't pushed too many already:
+ if(stack.size() > BOOST_REGEX_MAX_BLOCKS)
return -1;
- return result + r1;
+ stack.push_back(std::make_tuple(result, static_cast<re_alt*>(state)->alt.p));
+ // and take the first one:
+ state = state->next.p;
+ continue;
}
default:
break;
@@ -1074,7 +1107,7 @@ struct recursion_saver
};
template <class charT, class traits>
-void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask)
+void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask, unsigned recursion_count)
{
recursion_saver saved_recursions(&m_recursion_checks);
int not_last_jump = 1;
@@ -1085,6 +1118,28 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
// track case sensitivity:
bool l_icase = m_icase;
+ if (recursion_count > BOOST_REGEX_MAX_RECURSION_DEPTH)
+ {
+ // Oops error:
+ if (0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_complexity;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if (0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = "Expression complexity exceeded.";
+ boost::regex_error e(message, boost::regex_constants::error_complexity, 0);
+ e.raise();
+ }
+ return;
+ }
+
while(state)
{
switch(state->type)
@@ -1122,7 +1177,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
}
// now figure out if we can match a NULL string at this point:
if(pnull)
- create_startmap(state->next.p, 0, pnull, mask);
+ create_startmap(state->next.p, 0, pnull, mask, ++recursion_count);
return;
}
case syntax_element_recurse:
@@ -1184,7 +1239,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
case syntax_element_word_start:
{
// recurse, then AND with all the word characters:
- create_startmap(state->next.p, l_map, pnull, mask);
+ create_startmap(state->next.p, l_map, pnull, mask, ++recursion_count);
if(l_map)
{
l_map[0] |= mask_init;
@@ -1199,7 +1254,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
case syntax_element_word_end:
{
// recurse, then AND with all the word characters:
- create_startmap(state->next.p, l_map, pnull, mask);
+ create_startmap(state->next.p, l_map, pnull, mask, ++recursion_count);
if(l_map)
{
l_map[0] |= mask_init;
@@ -1291,11 +1346,11 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
return;
}
set_bad_repeat(state);
- create_startmap(state->next.p, l_map, pnull, mask);
+ create_startmap(state->next.p, l_map, pnull, mask, ++recursion_count);
if((state->type == syntax_element_alt)
|| (static_cast<re_repeat*>(state)->min == 0)
|| (not_last_jump == 0))
- create_startmap(rep->alt.p, l_map, pnull, mask);
+ create_startmap(rep->alt.p, l_map, pnull, mask, ++recursion_count);
}
}
return;
@@ -1354,7 +1409,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
if(ok && ((m_recursion_checks[static_cast<re_brace*>(state)->index] & 2u) == 0))
{
m_recursion_checks[static_cast<re_brace*>(state)->index] |= 2u;
- create_startmap(p->next.p, l_map, pnull, mask);
+ create_startmap(p->next.p, l_map, pnull, mask, ++recursion_count);
}
}
state = state->next.p;
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_parser.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_parser.hpp
index 34d775ef841..b7408dc4206 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_parser.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/basic_regex_parser.hpp
@@ -19,6 +19,15 @@
#ifndef BOOST_REGEX_V5_BASIC_REGEX_PARSER_HPP
#define BOOST_REGEX_V5_BASIC_REGEX_PARSER_HPP
+#include <boost/regex/v5/basic_regex_creator.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
+#include <climits>
+#include <cstdint>
+#include <limits>
+#include <type_traits>
+#endif
+
namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
@@ -889,6 +898,11 @@ escape_type_class_jump:
}
const charT* pc = m_position;
std::intmax_t i = this->m_traits.toi(pc, m_end, 10);
+ if(i < 0 && !syn_end)
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
if((i < 0) && syn_end)
{
// Check for a named capture, get the leftmost one if there is more than one:
@@ -988,7 +1002,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
if((m_position != m_end)
&& (0 == (this->flags() & regbase::main_option_type))
&& (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
- {
+ {
possessive = true;
++m_position;
}
@@ -1105,6 +1119,13 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
else
contin = false;
break;
+ case regex_constants::syntax_hash:
+ if (this->flags() & regex_constants::mod_x) {
+ while((m_position != m_end) && !is_separator(*m_position++)){}
+ contin = true;
+ break;
+ }
+ BOOST_REGEX_FALLTHROUGH;
default:
contin = false;
}
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/c_regex_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/c_regex_traits.hpp
index 9de34632561..3dbf4d896cb 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/c_regex_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/c_regex_traits.hpp
@@ -19,9 +19,16 @@
#ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED
#define BOOST_C_REGEX_TRAITS_HPP_INCLUDED
+#ifndef BOOST_REGEX_AS_MODULE
+#include <cctype>
+#include <cstdint>
+#include <cwctype>
+#endif
+
#include <boost/regex/config.hpp>
#include <boost/regex/v5/regex_workaround.hpp>
-#include <cctype>
+#include <boost/regex/v5/primary_transform.hpp>
+#include <boost/regex/v5/regex_traits_defaults.hpp>
namespace boost{
@@ -49,10 +56,10 @@ namespace boost{
}
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
struct c_regex_traits;
-template<>
+BOOST_REGEX_MODULE_EXPORT template<>
struct c_regex_traits<char>
{
c_regex_traits(){}
@@ -97,7 +104,7 @@ private:
};
#ifndef BOOST_NO_WREGEX
-template<>
+BOOST_REGEX_MODULE_EXPORT template<>
struct c_regex_traits<wchar_t>
{
c_regex_traits(){}
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/char_regex_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/char_regex_traits.hpp
index aeed86f834e..41fe420ba2a 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/char_regex_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/char_regex_traits.hpp
@@ -20,6 +20,8 @@
#ifndef BOOST_REGEX_V5_CHAR_REGEX_TRAITS_HPP
#define BOOST_REGEX_V5_CHAR_REGEX_TRAITS_HPP
+#include <boost/regex/v5/regex_traits.hpp>
+
namespace boost{
namespace deprecated{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/cpp_regex_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/cpp_regex_traits.hpp
index 26b6f503d66..a79f6628a49 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/cpp_regex_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/cpp_regex_traits.hpp
@@ -20,22 +20,25 @@
#define BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
#include <boost/regex/config.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
#include <cstdint>
#include <locale>
#include <type_traits>
+#include <climits>
+#include <ios>
+#include <istream>
+#ifdef BOOST_HAS_THREADS
+#include <mutex>
+#endif
+#endif
#include <boost/regex/pattern_except.hpp>
#include <boost/regex/v5/regex_traits_defaults.hpp>
-#ifdef BOOST_HAS_THREADS
-#include <mutex>
-#endif
#include <boost/regex/v5/primary_transform.hpp>
#include <boost/regex/v5/object_cache.hpp>
-#include <climits>
-#include <ios>
-#include <istream>
#ifdef BOOST_REGEX_MSVC
#pragma warning(push)
@@ -47,7 +50,7 @@ namespace boost{
//
// forward declaration is needed by some compilers:
//
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
class cpp_regex_traits;
namespace BOOST_REGEX_DETAIL_NS{
@@ -731,7 +734,7 @@ inline std::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp
} // BOOST_REGEX_DETAIL_NS
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
class cpp_regex_traits
{
private:
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/cregex.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/cregex.hpp
index a6571052158..f568d3b3978 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/cregex.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/cregex.hpp
@@ -14,7 +14,6 @@
* FILE cregex.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Declares POSIX API functions
- * + boost::RegEx high level wrapper.
*/
#ifndef BOOST_RE_CREGEX_HPP_INCLUDED
@@ -39,11 +38,13 @@
#endif
#endif
+#ifndef BOOST_REGEX_AS_MODULE
#ifdef __cplusplus
#include <cstddef>
#else
#include <stddef.h>
#endif
+#endif
/* include these defs only for POSIX compatablity */
#ifdef __cplusplus
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/error_type.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/error_type.hpp
index afcc71e3d84..a3161d28738 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/error_type.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/error_type.hpp
@@ -26,7 +26,7 @@ namespace boost{
#ifdef __cplusplus
namespace regex_constants{
-enum error_type{
+BOOST_REGEX_MODULE_EXPORT enum error_type{
error_ok = 0, /* not used */
error_no_match = 1, /* not used */
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/icu.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/icu.hpp
index aefd97684a6..213633aa0e3 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/icu.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/icu.hpp
@@ -19,11 +19,13 @@
#ifndef BOOST_REGEX_ICU_V5_HPP
#define BOOST_REGEX_ICU_V5_HPP
+#ifndef BOOST_REGEX_AS_MODULE
#include <unicode/utypes.h>
#include <unicode/uchar.h>
#include <unicode/coll.h>
#include <type_traits>
#include <functional>
+#endif
#include <boost/regex.hpp>
#include <boost/regex/v5/unicode_iterator.hpp>
@@ -835,7 +837,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
}
} // namespace BOOST_REGEX_DETAIL_NS
-template <class BidiIterator, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator>
inline bool u32regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
@@ -843,7 +845,7 @@ inline bool u32regex_match(BidiIterator first, BidiIterator last,
{
return BOOST_REGEX_DETAIL_NS::do_regex_match(first, last, m, e, flags, static_cast<std::integral_constant<int, sizeof(*first)> const*>(0));
}
-inline bool u32regex_match(const UChar* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const UChar* p,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -851,7 +853,7 @@ inline bool u32regex_match(const UChar* p,
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<std::integral_constant<int, 2> const*>(0));
}
#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_match(const wchar_t* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -859,21 +861,21 @@ inline bool u32regex_match(const wchar_t* p,
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_match(const char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const char* p,
match_results<const char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_match(const unsigned char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const unsigned char* p,
match_results<const unsigned char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_match(const std::string& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const std::string& s,
match_results<std::string::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -881,7 +883,7 @@ inline bool u32regex_match(const std::string& s,
return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<std::integral_constant<int, 1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_match(const std::wstring& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const std::wstring& s,
match_results<std::wstring::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -889,7 +891,7 @@ inline bool u32regex_match(const std::wstring& s,
return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -899,7 +901,7 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
//
// regex_match overloads that do not return what matched:
//
-template <class BidiIterator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator>
inline bool u32regex_match(BidiIterator first, BidiIterator last,
const u32regex& e,
match_flag_type flags = match_default)
@@ -907,7 +909,7 @@ inline bool u32regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator> m;
return BOOST_REGEX_DETAIL_NS::do_regex_match(first, last, m, e, flags, static_cast<std::integral_constant<int, sizeof(*first)> const*>(0));
}
-inline bool u32regex_match(const UChar* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const UChar* p,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -915,7 +917,7 @@ inline bool u32regex_match(const UChar* p,
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<std::integral_constant<int, 2> const*>(0));
}
#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_match(const wchar_t* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const wchar_t* p,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -923,21 +925,21 @@ inline bool u32regex_match(const wchar_t* p,
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_match(const char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const char*> m;
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_match(const unsigned char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const unsigned char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const unsigned char*> m;
return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_match(const std::string& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const std::string& s,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -945,7 +947,7 @@ inline bool u32regex_match(const std::string& s,
return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<std::integral_constant<int, 1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_match(const std::wstring& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const std::wstring& s,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -953,7 +955,7 @@ inline bool u32regex_match(const std::wstring& s,
return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -1011,7 +1013,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
}
}
-template <class BidiIterator, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator>
inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
@@ -1019,7 +1021,7 @@ inline bool u32regex_search(BidiIterator first, BidiIterator last,
{
return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, first, static_cast<std::integral_constant<int, sizeof(*first)> const*>(0));
}
-template <class BidiIterator, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator>
inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
@@ -1028,7 +1030,7 @@ inline bool u32regex_search(BidiIterator first, BidiIterator last,
{
return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, base, static_cast<std::integral_constant<int, sizeof(*first)> const*>(0));
}
-inline bool u32regex_search(const UChar* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const UChar* p,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -1036,7 +1038,7 @@ inline bool u32regex_search(const UChar* p,
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<std::integral_constant<int, 2> const*>(0));
}
#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_search(const wchar_t* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -1044,21 +1046,21 @@ inline bool u32regex_search(const wchar_t* p,
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_search(const char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const char* p,
match_results<const char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_search(const unsigned char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const unsigned char* p,
match_results<const unsigned char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_search(const std::string& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const std::string& s,
match_results<std::string::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -1066,7 +1068,7 @@ inline bool u32regex_search(const std::string& s,
return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<std::integral_constant<int, 1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_search(const std::wstring& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const std::wstring& s,
match_results<std::wstring::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
@@ -1074,14 +1076,14 @@ inline bool u32regex_search(const std::wstring& s,
return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return BOOST_REGEX_DETAIL_NS::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<std::integral_constant<int, 2> const*>(0));
}
-template <class BidiIterator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator>
inline bool u32regex_search(BidiIterator first, BidiIterator last,
const u32regex& e,
match_flag_type flags = match_default)
@@ -1089,7 +1091,7 @@ inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator> m;
return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, first, static_cast<std::integral_constant<int, sizeof(*first)> const*>(0));
}
-inline bool u32regex_search(const UChar* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const UChar* p,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -1097,7 +1099,7 @@ inline bool u32regex_search(const UChar* p,
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<std::integral_constant<int, 2> const*>(0));
}
#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_search(const wchar_t* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const wchar_t* p,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -1105,21 +1107,21 @@ inline bool u32regex_search(const wchar_t* p,
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_search(const char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const char*> m;
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_search(const unsigned char* p,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const unsigned char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const unsigned char*> m;
return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<std::integral_constant<int, 1> const*>(0));
}
-inline bool u32regex_search(const std::string& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const std::string& s,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -1127,7 +1129,7 @@ inline bool u32regex_search(const std::string& s,
return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<std::integral_constant<int, 1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_search(const std::wstring& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const std::wstring& s,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -1135,7 +1137,7 @@ inline bool u32regex_search(const std::wstring& s,
return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<std::integral_constant<int, sizeof(wchar_t)> const*>(0));
}
#endif
-inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+BOOST_REGEX_MODULE_EXPORT inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
match_flag_type flags = match_default)
{
@@ -1258,7 +1260,7 @@ inline BaseIterator extract_output_base(const utf16_output_iterator<BaseIterator
}
} // BOOST_REGEX_DETAIL_NS
-template <class OutputIterator, class BidirectionalIterator, class charT>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class BidirectionalIterator, class charT>
inline OutputIterator u32regex_replace(OutputIterator out,
BidirectionalIterator first,
BidirectionalIterator last,
@@ -1277,7 +1279,7 @@ inline OutputIterator u32regex_replace(OutputIterator out,
);
}
-template <class OutputIterator, class Iterator, class charT>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator, class charT>
inline OutputIterator u32regex_replace(OutputIterator out,
Iterator first,
Iterator last,
@@ -1296,7 +1298,7 @@ inline OutputIterator u32regex_replace(OutputIterator out,
);
}
-template <class OutputIterator, class Iterator>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator>
inline OutputIterator u32regex_replace(OutputIterator out,
Iterator first,
Iterator last,
@@ -1315,7 +1317,7 @@ inline OutputIterator u32regex_replace(OutputIterator out,
);
}
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
const u32regex& e,
const charT* fmt,
@@ -1327,7 +1329,7 @@ std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
return result;
}
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
const u32regex& e,
const std::basic_string<charT>& fmt,
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_category.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_category.hpp
index 9bd745781c3..bb6f638e681 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_category.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_category.hpp
@@ -21,8 +21,10 @@
#ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP
#define BOOST_REGEX_ITERATOR_CATEGORY_HPP
+#ifndef BOOST_REGEX_AS_MODULE
#include <iterator>
#include <type_traits>
+#endif
namespace boost{
namespace detail{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_traits.hpp
index 293db6bf8c4..7d3290cc5a9 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/iterator_traits.hpp
@@ -19,6 +19,10 @@
#ifndef BOOST_REGEX_V5_ITERATOR_TRAITS_HPP
#define BOOST_REGEX_V5_ITERATOR_TRAITS_HPP
+#ifndef BOOST_REGEX_AS_MODULE
+#include <iterator>
+#endif
+
namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/match_flags.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/match_flags.hpp
index 6ff236b041e..a2e7e46d12a 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/match_flags.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/match_flags.hpp
@@ -19,9 +19,11 @@
#ifndef BOOST_REGEX_V5_MATCH_FLAGS
#define BOOST_REGEX_V5_MATCH_FLAGS
+#ifndef BOOST_REGEX_AS_MODULE
#ifdef __cplusplus
# include <cstdint>
#endif
+#endif
#ifdef __cplusplus
namespace boost{
@@ -35,7 +37,7 @@ namespace boost{
#endif
#endif
-typedef enum _match_flags
+BOOST_REGEX_MODULE_EXPORT typedef enum _match_flags
{
match_default = 0,
match_not_bol = 1, /* first is not start of line */
@@ -89,22 +91,22 @@ typedef enum _match_flags
} match_flags;
-typedef match_flags match_flag_type;
+BOOST_REGEX_MODULE_EXPORT typedef match_flags match_flag_type;
#ifdef __cplusplus
-inline match_flags operator&(match_flags m1, match_flags m2)
+BOOST_REGEX_MODULE_EXPORT inline match_flags operator&(match_flags m1, match_flags m2)
{ return static_cast<match_flags>(static_cast<std::int32_t>(m1) & static_cast<std::int32_t>(m2)); }
-inline match_flags operator|(match_flags m1, match_flags m2)
+BOOST_REGEX_MODULE_EXPORT inline match_flags operator|(match_flags m1, match_flags m2)
{ return static_cast<match_flags>(static_cast<std::int32_t>(m1) | static_cast<std::int32_t>(m2)); }
-inline match_flags operator^(match_flags m1, match_flags m2)
+BOOST_REGEX_MODULE_EXPORT inline match_flags operator^(match_flags m1, match_flags m2)
{ return static_cast<match_flags>(static_cast<std::int32_t>(m1) ^ static_cast<std::int32_t>(m2)); }
-inline match_flags operator~(match_flags m1)
-{ return static_cast<match_flags>(~static_cast<std::int32_t>(m1)); }
-inline match_flags& operator&=(match_flags& m1, match_flags m2)
+BOOST_REGEX_MODULE_EXPORT inline match_flags operator~(match_flags m1)
+{ return static_cast<match_flags>(~static_cast<std::int32_t>(m1) & static_cast<std::int32_t>(match_not_any)); }
+BOOST_REGEX_MODULE_EXPORT inline match_flags& operator&=(match_flags& m1, match_flags m2)
{ m1 = m1&m2; return m1; }
-inline match_flags& operator|=(match_flags& m1, match_flags m2)
+BOOST_REGEX_MODULE_EXPORT inline match_flags& operator|=(match_flags& m1, match_flags m2)
{ m1 = m1|m2; return m1; }
-inline match_flags& operator^=(match_flags& m1, match_flags m2)
+BOOST_REGEX_MODULE_EXPORT inline match_flags& operator^=(match_flags& m1, match_flags m2)
{ m1 = m1^m2; return m1; }
#endif
@@ -113,36 +115,36 @@ inline match_flags& operator^=(match_flags& m1, match_flags m2)
/*
* import names into boost for backwards compatibility:
*/
-using regex_constants::match_flag_type;
-using regex_constants::match_default;
-using regex_constants::match_not_bol;
-using regex_constants::match_not_eol;
-using regex_constants::match_not_bob;
-using regex_constants::match_not_eob;
-using regex_constants::match_not_bow;
-using regex_constants::match_not_eow;
-using regex_constants::match_not_dot_newline;
-using regex_constants::match_not_dot_null;
-using regex_constants::match_prev_avail;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_flag_type;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_default;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_bol;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_eol;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_bob;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_eob;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_bow;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_eow;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_dot_newline;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_dot_null;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_prev_avail;
/* using regex_constants::match_init; */
-using regex_constants::match_any;
-using regex_constants::match_not_null;
-using regex_constants::match_continuous;
-using regex_constants::match_partial;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_any;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_not_null;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_continuous;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_partial;
/*using regex_constants::match_stop; */
-using regex_constants::match_all;
-using regex_constants::match_perl;
-using regex_constants::match_posix;
-using regex_constants::match_nosubs;
-using regex_constants::match_extra;
-using regex_constants::match_single_line;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_all;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_perl;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_posix;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_nosubs;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_extra;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::match_single_line;
/*using regex_constants::match_max; */
-using regex_constants::format_all;
-using regex_constants::format_sed;
-using regex_constants::format_perl;
-using regex_constants::format_default;
-using regex_constants::format_no_copy;
-using regex_constants::format_first_only;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::format_all;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::format_sed;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::format_perl;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::format_default;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::format_no_copy;
+BOOST_REGEX_MODULE_EXPORT using regex_constants::format_first_only;
/*using regex_constants::format_is_if;*/
#ifdef BOOST_REGEX_MSVC
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/match_results.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/match_results.hpp
index 3f9cd0129f4..874af2f6d3b 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/match_results.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/match_results.hpp
@@ -19,6 +19,16 @@
#ifndef BOOST_REGEX_V5_MATCH_RESULTS_HPP
#define BOOST_REGEX_V5_MATCH_RESULTS_HPP
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/sub_match.hpp>
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/regex_format.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
+#include <string>
+#include <vector>
+#endif
+
namespace boost{
#ifdef BOOST_REGEX_MSVC
#pragma warning(push)
@@ -37,7 +47,7 @@ class named_subexpressions;
}
-template <class BidiIterator, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator>
class match_results
{
private:
@@ -97,15 +107,23 @@ public:
bool empty() const
{ return m_subs.size() < 2; }
// element access:
- difference_type length(int sub = 0) const
+private:
+ difference_type do_get_length(int sub = 0) const
{
- if(m_is_singular)
+ if (m_is_singular)
raise_logic_error();
sub += 2;
- if((sub < (int)m_subs.size()) && (sub > 0))
+ if ((sub < (int)m_subs.size()) && (sub > 0))
return m_subs[sub].length();
return 0;
}
+public:
+ template <class Integer>
+ typename std::enable_if<std::is_integral<Integer>::value, difference_type>::type length(Integer sub) const
+ {
+ return do_get_length(static_cast<int>(sub));
+ }
+ difference_type length() const { return do_get_length(0); }
difference_type length(const char_type* sub) const
{
if(m_is_singular)
@@ -161,7 +179,8 @@ public:
{
return position(sub.c_str());
}
- string_type str(int sub = 0) const
+private:
+ string_type do_get_string(int sub = 0) const
{
if(m_is_singular)
raise_logic_error();
@@ -177,6 +196,13 @@ public:
}
return result;
}
+public:
+ template <class Integer>
+ typename std::enable_if<std::is_integral<Integer>::value, string_type>::type str(Integer sub) const
+ {
+ return do_get_string(static_cast<int>(sub));
+ }
+ string_type str() const { return do_get_string(0); }
string_type str(const char_type* sub) const
{
return (*this)[sub].str();
@@ -196,10 +222,15 @@ public:
{
return (*this)[sub].str();
}
- const_reference operator[](int sub) const
+private:
+ const_reference get_at(int sub) const
{
if(m_is_singular && m_subs.empty())
raise_logic_error();
+
+ if (sub >= INT_MAX - 2 )
+ return m_null;
+
sub += 2;
if(sub < (int)m_subs.size() && (sub >= 0))
{
@@ -207,6 +238,16 @@ public:
}
return m_null;
}
+public:
+ template <class Index>
+ typename std::enable_if<
+ std::is_integral<Index>::value || std::is_enum<Index>::value,
+ const_reference
+ >::type
+ operator[](Index sub) const
+ {
+ return get_at(static_cast<int>(sub));
+ }
//
// Named sub-expressions:
//
@@ -530,7 +571,7 @@ public:
void set_named_subs(std::shared_ptr<named_sub_type> subs)
{
- m_named_subs = subs;
+ m_named_subs = std::move(subs);
}
private:
@@ -643,13 +684,13 @@ void match_results<BidiIterator, Allocator>::maybe_assign(const match_results<B
*this = m;
}
-template <class BidiIterator, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator>
void swap(match_results<BidiIterator, Allocator>& a, match_results<BidiIterator, Allocator>& b)
{
a.swap(b);
}
-template <class charT, class traits, class BidiIterator, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class BidiIterator, class Allocator>
std::basic_ostream<charT, traits>&
operator << (std::basic_ostream<charT, traits>& os,
const match_results<BidiIterator, Allocator>& s)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/mem_block_cache.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/mem_block_cache.hpp
index 3e1216d06a8..18116fb43fa 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/mem_block_cache.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/mem_block_cache.hpp
@@ -18,6 +18,8 @@
#ifndef BOOST_REGEX_V5_MEM_BLOCK_CACHE_HPP
#define BOOST_REGEX_V5_MEM_BLOCK_CACHE_HPP
+#include <boost/regex/config.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <new>
#ifdef BOOST_HAS_THREADS
#include <mutex>
@@ -30,6 +32,8 @@
#define BOOST_REGEX_ATOMIC_POINTER std::atomic
#endif
#endif
+#endif
+
namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/object_cache.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/object_cache.hpp
index 6ebef9b34ec..c9aede144f3 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/object_cache.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/object_cache.hpp
@@ -20,6 +20,7 @@
#define BOOST_REGEX_OBJECT_CACHE_HPP
#include <boost/regex/config.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <memory>
#include <map>
#include <list>
@@ -28,6 +29,7 @@
#ifdef BOOST_HAS_THREADS
#include <mutex>
#endif
+#endif
namespace boost{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/pattern_except.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/pattern_except.hpp
index 3fbdca0a221..e01201039c0 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/pattern_except.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/pattern_except.hpp
@@ -23,8 +23,10 @@
#include <boost/regex/config.hpp>
#endif
+#ifndef BOOST_REGEX_AS_MODULE
#include <cstddef>
#include <stdexcept>
+#endif
#include <boost/regex/v5/error_type.hpp>
#include <boost/regex/v5/regex_traits_defaults.hpp>
@@ -37,7 +39,7 @@ namespace boost{
#pragma warning(disable : 26812 4459)
#endif
#endif
-class regex_error : public std::runtime_error
+BOOST_REGEX_MODULE_EXPORT class regex_error : public std::runtime_error
{
public:
explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0)
@@ -52,7 +54,7 @@ public:
, m_position(0)
{
}
- ~regex_error() noexcept override {}
+ ~regex_error() noexcept override = default;
regex_constants::error_type code()const
{ return m_error_code; }
std::ptrdiff_t position()const
@@ -72,8 +74,8 @@ private:
std::ptrdiff_t m_position;
};
-typedef regex_error bad_pattern;
-typedef regex_error bad_expression;
+BOOST_REGEX_MODULE_EXPORT typedef regex_error bad_pattern;
+BOOST_REGEX_MODULE_EXPORT typedef regex_error bad_expression;
namespace BOOST_REGEX_DETAIL_NS{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp
index deeffa589b3..8e600dba4b5 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp
@@ -12,7 +12,20 @@
#ifndef BOOST_REGEX_MATCHER_HPP
#define BOOST_REGEX_MATCHER_HPP
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/match_results.hpp>
+#include <boost/regex/v5/regbase.hpp>
#include <boost/regex/v5/iterator_category.hpp>
+#include <boost/regex/v5/states.hpp>
+#include <boost/regex/v5/regex_traits.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
+#ifndef BOOST_REGEX_STANDALONE
+#include <boost/throw_exception.hpp>
+#endif
+
+#include <climits>
+#endif
#ifdef BOOST_REGEX_MSVC
# pragma warning(push)
@@ -28,25 +41,34 @@
#endif
#endif
+#ifndef BOOST_REGEX_STANDALONE
+# define BOOST_REGEX_DETAIL_THROW(ex) boost::throw_exception(ex)
+#else
+# define BOOST_REGEX_DETAIL_THROW(ex) throw ex
+#endif
+
namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
//
// error checking API:
//
-inline void verify_options(boost::regex_constants::syntax_option_type, match_flag_type mf)
+inline void verify_options(boost::regex_constants::syntax_option_type, match_flag_type mf)
{
+ auto is_perl = (mf & match_perl);
+ auto is_posix = (mf & match_posix);
+
+ if (is_perl && is_posix)
+ {
+ BOOST_REGEX_DETAIL_THROW(std::logic_error("Usage Error: Can't mix Perl and POSIX matching rules"));
+ }
+
//
// can't mix match_extra with POSIX matching rules:
//
- if ((mf & match_extra) && (mf & match_posix))
+ if ((mf & match_extra) && is_posix)
{
- std::logic_error msg("Usage Error: Can't mix regular expression captures with POSIX matching rules");
-#ifndef BOOST_REGEX_STANDALONE
- throw_exception(msg);
-#else
- throw msg;
-#endif
+ BOOST_REGEX_DETAIL_THROW(std::logic_error("Usage Error: Can't mix regular expression captures with POSIX matching rules"));
}
}
//
@@ -558,6 +580,33 @@ private:
#endif
};
+template <class Matcher>
+inline bool factory_match(Matcher& m)
+{
+ return m.match();
+}
+template <class Matcher>
+inline bool factory_find(Matcher& m)
+{
+ return m.find();
+}
+
+#ifdef BOOST_REGEX_AS_MODULE
+bool factory_match(perl_matcher<const char*, match_results<const char*>::allocator_type, regex::traits_type>& m);
+bool factory_match(perl_matcher<const wchar_t*, match_results<const wchar_t*>::allocator_type, wregex::traits_type>& m);
+bool factory_match(perl_matcher<std::string::const_iterator, match_results<std::string::const_iterator>::allocator_type, regex::traits_type>& m);
+bool factory_match(perl_matcher<std::wstring::const_iterator, match_results<std::wstring::const_iterator>::allocator_type, wregex::traits_type>& m);
+bool factory_match(perl_matcher<std::string::iterator, match_results<std::string::iterator>::allocator_type, regex::traits_type>& m);
+bool factory_match(perl_matcher<std::wstring::iterator, match_results<std::wstring::iterator>::allocator_type, wregex::traits_type>& m);
+
+bool factory_find(perl_matcher<const char*, match_results<const char*>::allocator_type, regex::traits_type>& m);
+bool factory_find(perl_matcher<const wchar_t*, match_results<const wchar_t*>::allocator_type, wregex::traits_type>& m);
+bool factory_find(perl_matcher<std::string::const_iterator, match_results<std::string::const_iterator>::allocator_type, regex::traits_type>& m);
+bool factory_find(perl_matcher<std::wstring::const_iterator, match_results<std::wstring::const_iterator>::allocator_type, wregex::traits_type>& m);
+bool factory_find(perl_matcher<std::string::iterator, match_results<std::string::iterator>::allocator_type, regex::traits_type>& m);
+bool factory_find(perl_matcher<std::wstring::iterator, match_results<std::wstring::iterator>::allocator_type, wregex::traits_type>& m);
+#endif
+
} // namespace BOOST_REGEX_DETAIL_NS
#ifdef BOOST_REGEX_MSVC
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_common.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_common.hpp
index dcce9e6ac18..ff3a69e88a3 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_common.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_common.hpp
@@ -20,6 +20,22 @@
#ifndef BOOST_REGEX_V5_PERL_MATCHER_COMMON_HPP
#define BOOST_REGEX_V5_PERL_MATCHER_COMMON_HPP
+#include <boost/regex/config.hpp>
+
+#ifndef BOOST_REGEX_STANDALONE
+
+#include <boost/config.hpp>
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+#pragma once
+#include <boost/regex/v5/perl_matcher.hpp>
+#endif
+
+#endif
+
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/match_results.hpp>
+
#ifdef BOOST_REGEX_MSVC
# pragma warning(push)
#pragma warning(disable:4459)
@@ -44,12 +60,7 @@ void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_r
if(e.empty())
{
// precondition failure: e is not a valid regex.
- std::invalid_argument ex("Invalid regular expression object");
-#ifndef BOOST_REGEX_STANDALONE
- boost::throw_exception(ex);
-#else
- throw e;
-#endif
+ BOOST_REGEX_DETAIL_THROW(std::invalid_argument("Invalid regular expression object"));
}
pstate = 0;
m_match_flags = f;
@@ -82,7 +93,11 @@ void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_r
match_any_mask = static_cast<unsigned char>((f & match_not_dot_newline) ? BOOST_REGEX_DETAIL_NS::test_not_newline : BOOST_REGEX_DETAIL_NS::test_newline);
// Disable match_any if requested in the state machine:
if(e.get_data().m_disable_match_any)
+ {
+ if (m_match_flags & match_posix)
+ BOOST_REGEX_DETAIL_THROW(std::logic_error("Invalid regex for POSIX-style matching"));
m_match_flags &= regex_constants::match_not_any;
+ }
}
#ifdef BOOST_REGEX_MSVC
# pragma warning(pop)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp
index 28d6c462fea..5a1c3f4c594 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp
@@ -20,6 +20,18 @@
#ifndef BOOST_REGEX_V5_PERL_MATCHER_NON_RECURSIVE_HPP
#define BOOST_REGEX_V5_PERL_MATCHER_NON_RECURSIVE_HPP
+#include <boost/regex/config.hpp>
+
+#ifndef BOOST_REGEX_STANDALONE
+
+#include <boost/config.hpp>
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+#pragma once
+#include <boost/regex/v5/perl_matcher.hpp>
+#endif
+
+#endif
+
#include <boost/regex/v5/mem_block_cache.hpp>
#ifdef BOOST_REGEX_MSVC
@@ -225,8 +237,8 @@ void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
saved_state* backup_state;
stack_base = static_cast<saved_state*>(get_mem_block());
backup_state = reinterpret_cast<saved_state*>(reinterpret_cast<char*>(stack_base)+BOOST_REGEX_BLOCKSIZE);
- saved_extra_block* block = static_cast<saved_extra_block*>(backup_state);
- --block;
+ saved_extra_block* block = reinterpret_cast<saved_extra_block*>(
+ reinterpret_cast<std::uintptr_t>(backup_state) - sizeof(saved_extra_block));
(void) new (block) saved_extra_block(m_stack_base, m_backup_state);
m_stack_base = stack_base;
m_backup_state = block;
@@ -1204,7 +1216,10 @@ bool perl_matcher<BidiIterator, Allocator, traits>::skip_until_paren(int index,
else if(pstate->type == syntax_element_startmark)
{
int idx = static_cast<const re_brace*>(pstate)->index;
- pstate = pstate->next.p;
+ if(idx > 0)
+ match_startmark();
+ else
+ pstate = pstate->next.p;
skip_until_paren(idx, false);
continue;
}
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regbase.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regbase.hpp
index 5cefb36b4c7..42fda89a462 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regbase.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regbase.hpp
@@ -19,6 +19,8 @@
#ifndef BOOST_REGEX_V5_REGBASE_HPP
#define BOOST_REGEX_V5_REGBASE_HPP
+#include <boost/regex/config.hpp>
+
namespace boost{
//
// class regbase
@@ -112,7 +114,7 @@ public:
//
namespace regex_constants{
- enum flag_type_
+ BOOST_REGEX_MODULE_EXPORT enum flag_type_
{
no_except = ::boost::regbase::no_except,
@@ -148,7 +150,7 @@ namespace regex_constants{
JavaScript = normal,
JScript = normal
};
- typedef ::boost::regbase::flag_type syntax_option_type;
+ BOOST_REGEX_MODULE_EXPORT typedef ::boost::regbase::flag_type syntax_option_type;
} // namespace regex_constants
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex.hpp
index eb6dc728228..bd5244ee71b 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex.hpp
@@ -46,17 +46,17 @@
namespace boost{
#ifdef BOOST_REGEX_NO_FWD
-typedef basic_regex<char, regex_traits<char> > regex;
+BOOST_REGEX_MODULE_EXPORT typedef basic_regex<char, regex_traits<char> > regex;
#ifndef BOOST_NO_WREGEX
-typedef basic_regex<wchar_t, regex_traits<wchar_t> > wregex;
+BOOST_REGEX_MODULE_EXPORT typedef basic_regex<wchar_t, regex_traits<wchar_t> > wregex;
#endif
#endif
-typedef match_results<const char*> cmatch;
-typedef match_results<std::string::const_iterator> smatch;
+BOOST_REGEX_MODULE_EXPORT typedef match_results<const char*> cmatch;
+BOOST_REGEX_MODULE_EXPORT typedef match_results<std::string::const_iterator> smatch;
#ifndef BOOST_NO_WREGEX
-typedef match_results<const wchar_t*> wcmatch;
-typedef match_results<std::wstring::const_iterator> wsmatch;
+BOOST_REGEX_MODULE_EXPORT typedef match_results<const wchar_t*> wcmatch;
+BOOST_REGEX_MODULE_EXPORT typedef match_results<std::wstring::const_iterator> wsmatch;
#endif
} // namespace boost
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_format.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_format.hpp
index 4c82d185aa7..afd9d915a4c 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_format.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_format.hpp
@@ -21,15 +21,20 @@
#ifndef BOOST_REGEX_FORMAT_HPP
#define BOOST_REGEX_FORMAT_HPP
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/sub_match.hpp>
+#include <boost/regex/v5/regex_traits_defaults.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <type_traits>
#include <functional>
+#endif
namespace boost{
//
// Forward declaration:
//
- template <class BidiIterator, class Allocator = typename std::vector<sub_match<BidiIterator> >::allocator_type >
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator = typename std::vector<sub_match<BidiIterator> >::allocator_type >
class match_results;
namespace BOOST_REGEX_DETAIL_NS{
@@ -97,11 +102,11 @@ private:
void put(char_type c);
void put(const sub_match_type& sub);
- void format_all();
+ void format_all(unsigned recursion_count = 0);
void format_perl();
void format_escape();
- void format_conditional();
- void format_until_scope_end();
+ void format_conditional(unsigned recursion_count);
+ void format_until_scope_end(unsigned recursion_count);
bool handle_perl_verb(bool have_brace);
inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const std::integral_constant<bool, false>&)
@@ -199,7 +204,7 @@ OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIte
}
template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all()
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all(unsigned recursion_count)
{
// over and over:
while(m_position != m_end)
@@ -219,12 +224,12 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
format_escape();
break;
case '(':
- if(m_flags & boost::regex_constants::format_all)
+ if((m_flags & boost::regex_constants::format_all) && (recursion_count < BOOST_REGEX_MAX_RECURSION_DEPTH))
{
++m_position;
bool have_conditional = m_have_conditional;
m_have_conditional = false;
- format_until_scope_end();
+ format_until_scope_end(recursion_count);
m_have_conditional = have_conditional;
if(m_position == m_end)
return;
@@ -252,10 +257,10 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
++m_position;
break;
case '?':
- if(m_flags & boost::regex_constants::format_all)
+ if((m_flags & boost::regex_constants::format_all) && (recursion_count < BOOST_REGEX_MAX_RECURSION_DEPTH))
{
++m_position;
- format_conditional();
+ format_conditional(recursion_count);
break;
}
put(*m_position);
@@ -644,7 +649,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
}
template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional()
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional(unsigned recursion_count)
{
if(m_position == m_end)
{
@@ -692,7 +697,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
if(m_results[v].matched)
{
m_have_conditional = true;
- format_all();
+ format_all(++recursion_count);
m_have_conditional = false;
if((m_position != m_end) && (*m_position == static_cast<char_type>(':')))
{
@@ -702,7 +707,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
output_state saved_state = m_state;
m_state = output_none;
// format the rest of this scope:
- format_until_scope_end();
+ format_until_scope_end(recursion_count);
// restore output state:
m_state = saved_state;
}
@@ -714,7 +719,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
m_state = output_none;
// format until ':' or ')':
m_have_conditional = true;
- format_all();
+ format_all(++recursion_count);
m_have_conditional = false;
// restore state:
m_state = saved_state;
@@ -723,17 +728,17 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
// skip the ':':
++m_position;
// format the rest of this scope:
- format_until_scope_end();
+ format_until_scope_end(recursion_count);
}
}
}
template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end()
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end(unsigned recursion_count)
{
do
{
- format_all();
+ format_all(++recursion_count);
if((m_position == m_end) || (*m_position == static_cast<char_type>(')')))
return;
put(*m_position++);
@@ -1095,7 +1100,7 @@ struct compute_functor_type
} // namespace BOOST_REGEX_DETAIL_NS
-template <class OutputIterator, class Iterator, class Allocator, class Functor>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator, class Allocator, class Functor>
inline OutputIterator regex_format(OutputIterator out,
const match_results<Iterator, Allocator>& m,
Functor fmt,
@@ -1105,7 +1110,7 @@ inline OutputIterator regex_format(OutputIterator out,
return m.format(out, fmt, flags);
}
-template <class Iterator, class Allocator, class Functor>
+BOOST_REGEX_MODULE_EXPORT template <class Iterator, class Allocator, class Functor>
inline std::basic_string<typename match_results<Iterator, Allocator>::char_type> regex_format(const match_results<Iterator, Allocator>& m,
Functor fmt,
match_flag_type flags = format_all)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_fwd.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_fwd.hpp
index 3076b069ace..4f202a41766 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_fwd.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_fwd.hpp
@@ -36,30 +36,30 @@
namespace boost{
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
class cpp_regex_traits;
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
struct c_regex_traits;
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
class w32_regex_traits;
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
-template <class charT, class implementationT = w32_regex_traits<charT> >
+BOOST_REGEX_MODULE_EXPORT template <class charT, class implementationT = w32_regex_traits<charT> >
struct regex_traits;
#elif defined(BOOST_REGEX_USE_CPP_LOCALE)
-template <class charT, class implementationT = cpp_regex_traits<charT> >
+BOOST_REGEX_MODULE_EXPORT template <class charT, class implementationT = cpp_regex_traits<charT> >
struct regex_traits;
#else
-template <class charT, class implementationT = c_regex_traits<charT> >
+BOOST_REGEX_MODULE_EXPORT template <class charT, class implementationT = c_regex_traits<charT> >
struct regex_traits;
#endif
-template <class charT, class traits = regex_traits<charT> >
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits = regex_traits<charT> >
class basic_regex;
-typedef basic_regex<char, regex_traits<char> > regex;
+BOOST_REGEX_MODULE_EXPORT typedef basic_regex<char, regex_traits<char> > regex;
#ifndef BOOST_NO_WREGEX
-typedef basic_regex<wchar_t, regex_traits<wchar_t> > wregex;
+BOOST_REGEX_MODULE_EXPORT typedef basic_regex<wchar_t, regex_traits<wchar_t> > wregex;
#endif
} // namespace boost
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_grep.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_grep.hpp
index 6cd625d606c..4ae6a1779d7 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_grep.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_grep.hpp
@@ -19,6 +19,10 @@
#ifndef BOOST_REGEX_V5_REGEX_GREP_HPP
#define BOOST_REGEX_V5_REGEX_GREP_HPP
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/match_results.hpp>
+#include <boost/regex/v5/perl_matcher.hpp>
namespace boost{
@@ -26,7 +30,7 @@ namespace boost{
// regex_grep:
// find all non-overlapping matches within the sequence first last:
//
-template <class Predicate, class BidiIterator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class Predicate, class BidiIterator, class charT, class traits>
inline unsigned int regex_grep(Predicate foo,
BidiIterator first,
BidiIterator last,
@@ -41,7 +45,7 @@ inline unsigned int regex_grep(Predicate foo,
match_results<BidiIterator> m;
BOOST_REGEX_DETAIL_NS::perl_matcher<BidiIterator, match_allocator_type, traits> matcher(first, last, m, e, flags, first);
unsigned int count = 0;
- while(matcher.find())
+ while(BOOST_REGEX_DETAIL_NS::factory_find(matcher))
{
++count;
if(0 == foo(m))
@@ -56,7 +60,7 @@ inline unsigned int regex_grep(Predicate foo,
// a non-NULL one at the same position:
match_results<BidiIterator, match_allocator_type> m2(m);
matcher.setf(match_not_null | match_continuous);
- if(matcher.find())
+ if(BOOST_REGEX_DETAIL_NS::factory_find(matcher))
{
++count;
if(0 == foo(m))
@@ -76,7 +80,7 @@ inline unsigned int regex_grep(Predicate foo,
//
// regex_grep convenience interfaces:
//
-template <class Predicate, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class Predicate, class charT, class traits>
inline unsigned int regex_grep(Predicate foo, const charT* str,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
@@ -84,7 +88,7 @@ inline unsigned int regex_grep(Predicate foo, const charT* str,
return regex_grep(foo, str, str + traits::length(str), e, flags);
}
-template <class Predicate, class ST, class SA, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class Predicate, class ST, class SA, class charT, class traits>
inline unsigned int regex_grep(Predicate foo, const std::basic_string<charT, ST, SA>& s,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_iterator.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_iterator.hpp
index b2e9d2ced56..25a75e550ae 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_iterator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_iterator.hpp
@@ -19,7 +19,11 @@
#ifndef BOOST_REGEX_V5_REGEX_ITERATOR_HPP
#define BOOST_REGEX_V5_REGEX_ITERATOR_HPP
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/match_results.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <memory>
+#endif
namespace boost{
@@ -72,7 +76,7 @@ private:
regex_iterator_implementation& operator=(const regex_iterator_implementation&);
};
-template <class BidirectionalIterator,
+BOOST_REGEX_MODULE_EXPORT template <class BidirectionalIterator,
class charT = typename std::iterator_traits<BidirectionalIterator>::value_type,
class traits = regex_traits<charT> >
class regex_iterator
@@ -148,20 +152,20 @@ private:
}
};
-typedef regex_iterator<const char*> cregex_iterator;
-typedef regex_iterator<std::string::const_iterator> sregex_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_iterator<const char*> cregex_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_iterator<std::string::const_iterator> sregex_iterator;
#ifndef BOOST_NO_WREGEX
-typedef regex_iterator<const wchar_t*> wcregex_iterator;
-typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_iterator<const wchar_t*> wcregex_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator;
#endif
// make_regex_iterator:
-template <class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits>
inline regex_iterator<const charT*, charT, traits> make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, m);
}
-template <class charT, class traits, class ST, class SA>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class ST, class SA>
inline regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, m);
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_match.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_match.hpp
index 217535769b1..f70a6e62b98 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_match.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_match.hpp
@@ -22,6 +22,9 @@
#ifndef BOOST_REGEX_MATCH_HPP
#define BOOST_REGEX_MATCH_HPP
+#include <boost/regex/v5/match_results.hpp>
+#include <boost/regex/v5/perl_matcher.hpp>
+
namespace boost{
//
@@ -29,16 +32,16 @@ namespace boost{
// returns true if the specified regular expression matches
// the whole of the input. Fills in what matched in m.
//
-template <class BidiIterator, class Allocator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator, class charT, class traits>
bool regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
{
BOOST_REGEX_DETAIL_NS::perl_matcher<BidiIterator, Allocator, traits> matcher(first, last, m, e, flags, first);
- return matcher.match();
+ return BOOST_REGEX_DETAIL_NS::factory_match(matcher);
}
-template <class iterator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class iterator, class charT, class traits>
bool regex_match(iterator first, iterator last,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
@@ -49,7 +52,7 @@ bool regex_match(iterator first, iterator last,
//
// query_match convenience interfaces:
//
-template <class charT, class Allocator, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class Allocator, class traits>
inline bool regex_match(const charT* str,
match_results<const charT*, Allocator>& m,
const basic_regex<charT, traits>& e,
@@ -58,7 +61,7 @@ inline bool regex_match(const charT* str,
return regex_match(str, str + traits::length(str), m, e, flags);
}
-template <class ST, class SA, class Allocator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class ST, class SA, class Allocator, class charT, class traits>
inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
const basic_regex<charT, traits>& e,
@@ -66,7 +69,7 @@ inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
{
return regex_match(s.begin(), s.end(), m, e, flags);
}
-template <class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits>
inline bool regex_match(const charT* str,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
@@ -75,7 +78,7 @@ inline bool regex_match(const charT* str,
return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any);
}
-template <class ST, class SA, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class ST, class SA, class charT, class traits>
inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_merge.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_merge.hpp
index a5103c53e86..ba9ac21c2af 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_merge.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_merge.hpp
@@ -24,7 +24,7 @@
namespace boost{
-template <class OutputIterator, class Iterator, class traits, class charT>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator, class traits, class charT>
inline OutputIterator regex_merge(OutputIterator out,
Iterator first,
Iterator last,
@@ -35,7 +35,7 @@ inline OutputIterator regex_merge(OutputIterator out,
return regex_replace(out, first, last, e, fmt, flags);
}
-template <class OutputIterator, class Iterator, class traits, class charT>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator, class traits, class charT>
inline OutputIterator regex_merge(OutputIterator out,
Iterator first,
Iterator last,
@@ -46,7 +46,7 @@ inline OutputIterator regex_merge(OutputIterator out,
return regex_merge(out, first, last, e, fmt.c_str(), flags);
}
-template <class traits, class charT>
+BOOST_REGEX_MODULE_EXPORT template <class traits, class charT>
inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
const basic_regex<charT, traits>& e,
const charT* fmt,
@@ -55,7 +55,7 @@ inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
return regex_replace(s, e, fmt, flags);
}
-template <class traits, class charT>
+BOOST_REGEX_MODULE_EXPORT template <class traits, class charT>
inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
const basic_regex<charT, traits>& e,
const std::basic_string<charT>& fmt,
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_raw_buffer.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_raw_buffer.hpp
index 443c57a25b9..b3b8bb98b25 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_raw_buffer.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_raw_buffer.hpp
@@ -25,8 +25,11 @@
#include <boost/regex/config.hpp>
#endif
+#ifndef BOOST_REGEX_AS_MODULE
#include <algorithm>
#include <cstddef>
+#include <cstring>
+#endif
namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_replace.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_replace.hpp
index 75f8894fe99..4c2e993f4e3 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_replace.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_replace.hpp
@@ -22,9 +22,13 @@
#define BOOST_REGEX_V5_REGEX_REPLACE_HPP
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/regex_iterator.hpp>
+
namespace boost{
-template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter>
OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first,
BidirectionalIterator last,
@@ -58,7 +62,7 @@ OutputIterator regex_replace(OutputIterator out,
return out;
}
-template <class traits, class charT, class Formatter>
+BOOST_REGEX_MODULE_EXPORT 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,
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_search.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_search.hpp
index d0addb19486..fbb826b2880 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_search.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_search.hpp
@@ -20,9 +20,12 @@
#define BOOST_REGEX_V5_REGEX_SEARCH_HPP
+#include <boost/regex/v5/match_results.hpp>
+#include <boost/regex/v5/perl_matcher.hpp>
+
namespace boost{
-template <class BidiIterator, class Allocator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator, class charT, class traits>
bool regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const basic_regex<charT, traits>& e,
@@ -31,7 +34,7 @@ bool regex_search(BidiIterator first, BidiIterator last,
return regex_search(first, last, m, e, flags, first);
}
-template <class BidiIterator, class Allocator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class Allocator, class charT, class traits>
bool regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const basic_regex<charT, traits>& e,
@@ -42,13 +45,13 @@ bool regex_search(BidiIterator first, BidiIterator last,
return false;
BOOST_REGEX_DETAIL_NS::perl_matcher<BidiIterator, Allocator, traits> matcher(first, last, m, e, flags, base);
- return matcher.find();
+ return BOOST_REGEX_DETAIL_NS::factory_find(matcher);
}
//
// regex_search convenience interfaces:
//
-template <class charT, class Allocator, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class Allocator, class traits>
inline bool regex_search(const charT* str,
match_results<const charT*, Allocator>& m,
const basic_regex<charT, traits>& e,
@@ -57,7 +60,7 @@ inline bool regex_search(const charT* str,
return regex_search(str, str + traits::length(str), m, e, flags);
}
-template <class ST, class SA, class Allocator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class ST, class SA, class Allocator, class charT, class traits>
inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
const basic_regex<charT, traits>& e,
@@ -66,7 +69,7 @@ inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
return regex_search(s.begin(), s.end(), m, e, flags);
}
-template <class BidiIterator, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator, class charT, class traits>
bool regex_search(BidiIterator first, BidiIterator last,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
@@ -77,10 +80,10 @@ bool regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator> m;
typedef typename match_results<BidiIterator>::allocator_type match_alloc_type;
BOOST_REGEX_DETAIL_NS::perl_matcher<BidiIterator, match_alloc_type, traits> matcher(first, last, m, e, flags | regex_constants::match_any, first);
- return matcher.find();
+ return BOOST_REGEX_DETAIL_NS::factory_find(matcher);
}
-template <class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits>
inline bool regex_search(const charT* str,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
@@ -88,7 +91,7 @@ inline bool regex_search(const charT* str,
return regex_search(str, str + traits::length(str), e, flags);
}
-template <class ST, class SA, class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class ST, class SA, class charT, class traits>
inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
const basic_regex<charT, traits>& e,
match_flag_type flags = match_default)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_split.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_split.hpp
index 8d932896492..20bc19a8713 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_split.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_split.hpp
@@ -21,6 +21,9 @@
#ifndef BOOST_REGEX_SPLIT_HPP
#define BOOST_REGEX_SPLIT_HPP
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/match_results.hpp>
+
namespace boost{
#ifdef BOOST_REGEX_MSVC
@@ -90,7 +93,7 @@ bool split_pred<OutputIterator, charT, Traits1, Alloc1>::operator()
} // namespace BOOST_REGEX_DETAIL_NS
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
std::size_t regex_split(OutputIterator out,
std::basic_string<charT, Traits1, Alloc1>& s,
const basic_regex<charT, Traits2>& e,
@@ -125,7 +128,7 @@ std::size_t regex_split(OutputIterator out,
return init_size - max_split;
}
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
inline std::size_t regex_split(OutputIterator out,
std::basic_string<charT, Traits1, Alloc1>& s,
const basic_regex<charT, Traits2>& e,
@@ -134,7 +137,7 @@ inline std::size_t regex_split(OutputIterator out,
return regex_split(out, s, e, flags, UINT_MAX);
}
-template <class OutputIterator, class charT, class Traits1, class Alloc1>
+BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class charT, class Traits1, class Alloc1>
inline std::size_t regex_split(OutputIterator out,
std::basic_string<charT, Traits1, Alloc1>& s)
{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_token_iterator.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_token_iterator.hpp
index 16832746f72..283fcd22bf8 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_token_iterator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_token_iterator.hpp
@@ -19,7 +19,12 @@
#ifndef BOOST_REGEX_V5_REGEX_TOKEN_ITERATOR_HPP
#define BOOST_REGEX_V5_REGEX_TOKEN_ITERATOR_HPP
+#include <boost/regex/v5/basic_regex.hpp>
+#include <boost/regex/v5/match_results.hpp>
+#include <boost/regex/v5/sub_match.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <memory>
+#endif
namespace boost{
@@ -120,7 +125,7 @@ private:
regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&);
};
-template <class BidirectionalIterator,
+BOOST_REGEX_MODULE_EXPORT template <class BidirectionalIterator,
class charT = typename std::iterator_traits<BidirectionalIterator>::value_type,
class traits = regex_traits<charT> >
class regex_token_iterator
@@ -208,39 +213,39 @@ private:
}
};
-typedef regex_token_iterator<const char*> cregex_token_iterator;
-typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_token_iterator<const char*> cregex_token_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator;
#ifndef BOOST_NO_WREGEX
-typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
-typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
+BOOST_REGEX_MODULE_EXPORT typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
#endif
-template <class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits>
inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
}
-template <class charT, class traits, class ST, class SA>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class ST, class SA>
inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
-template <class charT, class traits, std::size_t N>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, std::size_t N>
inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
}
-template <class charT, class traits, class ST, class SA, std::size_t N>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class ST, class SA, std::size_t N>
inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
-template <class charT, class traits>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits>
inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
}
-template <class charT, class traits, class ST, class SA>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class ST, class SA>
inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits.hpp
index 6c64695b612..25dd542b1f5 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits.hpp
@@ -33,7 +33,7 @@
namespace boost{
-template <class charT, class implementationT >
+BOOST_REGEX_MODULE_EXPORT template <class charT, class implementationT >
struct regex_traits : public implementationT
{
regex_traits() : implementationT() {}
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits_defaults.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits_defaults.hpp
index 4b81441ffe4..1cd7adc1893 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits_defaults.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_traits_defaults.hpp
@@ -24,12 +24,14 @@
#include <boost/regex/v5/syntax_type.hpp>
#include <boost/regex/v5/error_type.hpp>
#include <boost/regex/v5/regex_workaround.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <type_traits>
#include <cstdint>
#include <cctype>
#include <locale>
#include <cwctype>
#include <limits>
+#endif
namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_workaround.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_workaround.hpp
index 8cd9044ce59..060e065c057 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/regex_workaround.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/regex_workaround.hpp
@@ -20,9 +20,11 @@
#define BOOST_REGEX_WORKAROUND_HPP
#include <boost/regex/config.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#include <algorithm>
#include <stdexcept>
#include <cstring>
+#endif
#ifndef BOOST_REGEX_STANDALONE
#include <boost/detail/workaround.hpp>
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/states.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/states.hpp
index 60fc99d0a86..3c3fca69c12 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/states.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/states.hpp
@@ -19,6 +19,13 @@
#ifndef BOOST_REGEX_V5_STATES_HPP
#define BOOST_REGEX_V5_STATES_HPP
+#include <boost/regex/v5/regex_raw_buffer.hpp>
+
+#ifndef BOOST_REGEX_AS_MODULE
+#include <climits>
+#include <cstddef>
+#endif
+
namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/sub_match.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/sub_match.hpp
index aa61b560dda..0dcb6d4d278 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/sub_match.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/sub_match.hpp
@@ -19,9 +19,14 @@
#ifndef BOOST_REGEX_V5_SUB_MATCH_HPP
#define BOOST_REGEX_V5_SUB_MATCH_HPP
+#ifndef BOOST_REGEX_AS_MODULE
+#include <iterator>
+#include <utility>
+#endif
+
namespace boost{
-template <class BidiIterator>
+BOOST_REGEX_MODULE_EXPORT template <class BidiIterator>
struct sub_match : public std::pair<BidiIterator, BidiIterator>
{
typedef typename std::iterator_traits<BidiIterator>::value_type value_type;
@@ -145,167 +150,167 @@ public:
BidiIterator end()const { return this->second; }
};
-typedef sub_match<const char*> csub_match;
-typedef sub_match<std::string::const_iterator> ssub_match;
+BOOST_REGEX_MODULE_EXPORT typedef sub_match<const char*> csub_match;
+BOOST_REGEX_MODULE_EXPORT typedef sub_match<std::string::const_iterator> ssub_match;
#ifndef BOOST_NO_WREGEX
-typedef sub_match<const wchar_t*> wcsub_match;
-typedef sub_match<std::wstring::const_iterator> wssub_match;
+BOOST_REGEX_MODULE_EXPORT typedef sub_match<const wchar_t*> wcsub_match;
+BOOST_REGEX_MODULE_EXPORT typedef sub_match<std::wstring::const_iterator> wssub_match;
#endif
// comparison to std::basic_string<> part 1:
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator == (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
{ return s.compare(m.str()) == 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator != (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
{ return s.compare(m.str()) != 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator < (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
{ return s.compare(m.str()) < 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator <= (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
{ return s.compare(m.str()) <= 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator >= (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
{ return s.compare(m.str()) >= 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator > (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
{ return s.compare(m.str()) > 0; }
// comparison to std::basic_string<> part 2:
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator == (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
{ return m.str().compare(s) == 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator != (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
{ return m.str().compare(s) != 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator < (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
{ return m.str().compare(s) < 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator > (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
{ return m.str().compare(s) > 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator <= (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
{ return m.str().compare(s) <= 0; }
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline bool operator >= (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
{ return m.str().compare(s) >= 0; }
// comparison to const charT* part 1:
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator == (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const* s)
{ return m.str().compare(s) == 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator != (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const* s)
{ return m.str().compare(s) != 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator > (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const* s)
{ return m.str().compare(s) > 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator < (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const* s)
{ return m.str().compare(s) < 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator >= (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const* s)
{ return m.str().compare(s) >= 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator <= (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const* s)
{ return m.str().compare(s) <= 0; }
// comparison to const charT* part 2:
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator == (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(s) == 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator != (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(s) != 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator < (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(s) > 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator > (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(s) < 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator <= (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(s) >= 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator >= (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(s) <= 0; }
// comparison to const charT& part 1:
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator == (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
{ return m.str().compare(0, m.length(), &s, 1) == 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator != (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
{ return m.str().compare(0, m.length(), &s, 1) != 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator > (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
{ return m.str().compare(0, m.length(), &s, 1) > 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator < (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
{ return m.str().compare(0, m.length(), &s, 1) < 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator >= (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
{ return m.str().compare(0, m.length(), &s, 1) >= 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator <= (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
{ return m.str().compare(0, m.length(), &s, 1) <= 0; }
// comparison to const charT* part 2:
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator == (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(0, m.length(), &s, 1) == 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator != (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(0, m.length(), &s, 1) != 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator < (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(0, m.length(), &s, 1) > 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator > (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(0, m.length(), &s, 1) < 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator <= (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(0, m.length(), &s, 1) >= 0; }
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline bool operator >= (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
{ return m.str().compare(0, m.length(), &s, 1) <= 0; }
// addition operators:
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>
operator + (const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s,
const sub_match<RandomAccessIterator>& m)
@@ -314,7 +319,7 @@ operator + (const std::basic_string<typename std::iterator_traits<RandomAccessIt
result.reserve(s.size() + m.length() + 1);
return result.append(s).append(m.first, m.second);
}
-template <class RandomAccessIterator, class traits, class Allocator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator, class traits, class Allocator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>
operator + (const sub_match<RandomAccessIterator>& m,
const std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type, traits, Allocator>& s)
@@ -323,7 +328,7 @@ operator + (const sub_match<RandomAccessIterator>& m,
result.reserve(s.size() + m.length() + 1);
return result.append(m.first, m.second).append(s);
}
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type>
operator + (typename std::iterator_traits<RandomAccessIterator>::value_type const* s,
const sub_match<RandomAccessIterator>& m)
@@ -332,7 +337,7 @@ operator + (typename std::iterator_traits<RandomAccessIterator>::value_type cons
result.reserve(std::char_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::length(s) + m.length() + 1);
return result.append(s).append(m.first, m.second);
}
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type>
operator + (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const * s)
@@ -341,7 +346,7 @@ operator + (const sub_match<RandomAccessIterator>& m,
result.reserve(std::char_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::length(s) + m.length() + 1);
return result.append(m.first, m.second).append(s);
}
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type>
operator + (typename std::iterator_traits<RandomAccessIterator>::value_type const& s,
const sub_match<RandomAccessIterator>& m)
@@ -350,7 +355,7 @@ operator + (typename std::iterator_traits<RandomAccessIterator>::value_type cons
result.reserve(m.length() + 2);
return result.append(1, s).append(m.first, m.second);
}
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type>
operator + (const sub_match<RandomAccessIterator>& m,
typename std::iterator_traits<RandomAccessIterator>::value_type const& s)
@@ -359,7 +364,7 @@ operator + (const sub_match<RandomAccessIterator>& m,
result.reserve(m.length() + 2);
return result.append(m.first, m.second).append(1, s);
}
-template <class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class RandomAccessIterator>
inline std::basic_string<typename std::iterator_traits<RandomAccessIterator>::value_type>
operator + (const sub_match<RandomAccessIterator>& m1,
const sub_match<RandomAccessIterator>& m2)
@@ -368,7 +373,7 @@ operator + (const sub_match<RandomAccessIterator>& m1,
result.reserve(m1.length() + m2.length() + 1);
return result.append(m1.first, m1.second).append(m2.first, m2.second);
}
-template <class charT, class traits, class RandomAccessIterator>
+BOOST_REGEX_MODULE_EXPORT template <class charT, class traits, class RandomAccessIterator>
std::basic_ostream<charT, traits>&
operator << (std::basic_ostream<charT, traits>& os,
const sub_match<RandomAccessIterator>& s)
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/syntax_type.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/syntax_type.hpp
index 3efdf0b0f93..7824d2d3936 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/syntax_type.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/syntax_type.hpp
@@ -19,84 +19,86 @@
#ifndef BOOST_REGEX_SYNTAX_TYPE_HPP
#define BOOST_REGEX_SYNTAX_TYPE_HPP
+#include <boost/regex/config.hpp>
+
namespace boost{
namespace regex_constants{
-typedef unsigned char syntax_type;
+BOOST_REGEX_MODULE_EXPORT typedef unsigned char syntax_type;
//
// values chosen are binary compatible with previous version:
//
-static const syntax_type syntax_char = 0;
-static const syntax_type syntax_open_mark = 1;
-static const syntax_type syntax_close_mark = 2;
-static const syntax_type syntax_dollar = 3;
-static const syntax_type syntax_caret = 4;
-static const syntax_type syntax_dot = 5;
-static const syntax_type syntax_star = 6;
-static const syntax_type syntax_plus = 7;
-static const syntax_type syntax_question = 8;
-static const syntax_type syntax_open_set = 9;
-static const syntax_type syntax_close_set = 10;
-static const syntax_type syntax_or = 11;
-static const syntax_type syntax_escape = 12;
-static const syntax_type syntax_dash = 14;
-static const syntax_type syntax_open_brace = 15;
-static const syntax_type syntax_close_brace = 16;
-static const syntax_type syntax_digit = 17;
-static const syntax_type syntax_comma = 27;
-static const syntax_type syntax_equal = 37;
-static const syntax_type syntax_colon = 36;
-static const syntax_type syntax_not = 53;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_char = 0;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_open_mark = 1;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_close_mark = 2;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_dollar = 3;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_caret = 4;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_dot = 5;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_star = 6;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_plus = 7;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_question = 8;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_open_set = 9;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_close_set = 10;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_or = 11;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_escape = 12;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_dash = 14;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_open_brace = 15;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_close_brace = 16;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_digit = 17;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_comma = 27;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_equal = 37;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_colon = 36;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_not = 53;
// extensions:
-static const syntax_type syntax_hash = 13;
-static const syntax_type syntax_newline = 26;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_hash = 13;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST syntax_type syntax_newline = 26;
// escapes:
-typedef syntax_type escape_syntax_type;
-
-static const escape_syntax_type escape_type_word_assert = 18;
-static const escape_syntax_type escape_type_not_word_assert = 19;
-static const escape_syntax_type escape_type_control_f = 29;
-static const escape_syntax_type escape_type_control_n = 30;
-static const escape_syntax_type escape_type_control_r = 31;
-static const escape_syntax_type escape_type_control_t = 32;
-static const escape_syntax_type escape_type_control_v = 33;
-static const escape_syntax_type escape_type_ascii_control = 35;
-static const escape_syntax_type escape_type_hex = 34;
-static const escape_syntax_type escape_type_unicode = 0; // not used
-static const escape_syntax_type escape_type_identity = 0; // not used
-static const escape_syntax_type escape_type_backref = syntax_digit;
-static const escape_syntax_type escape_type_decimal = syntax_digit; // not used
-static const escape_syntax_type escape_type_class = 22;
-static const escape_syntax_type escape_type_not_class = 23;
+BOOST_REGEX_MODULE_EXPORT typedef syntax_type escape_syntax_type;
+
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_word_assert = 18;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_not_word_assert = 19;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_control_f = 29;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_control_n = 30;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_control_r = 31;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_control_t = 32;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_control_v = 33;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_ascii_control = 35;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_hex = 34;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_unicode = 0; // not used
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_identity = 0; // not used
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_backref = syntax_digit;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_decimal = syntax_digit; // not used
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_class = 22;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_not_class = 23;
// extensions:
-static const escape_syntax_type escape_type_left_word = 20;
-static const escape_syntax_type escape_type_right_word = 21;
-static const escape_syntax_type escape_type_start_buffer = 24; // for \`
-static const escape_syntax_type escape_type_end_buffer = 25; // for \'
-static const escape_syntax_type escape_type_control_a = 28; // for \a
-static const escape_syntax_type escape_type_e = 38; // for \e
-static const escape_syntax_type escape_type_E = 47; // for \Q\E
-static const escape_syntax_type escape_type_Q = 48; // for \Q\E
-static const escape_syntax_type escape_type_X = 49; // for \X
-static const escape_syntax_type escape_type_C = 50; // for \C
-static const escape_syntax_type escape_type_Z = 51; // for \Z
-static const escape_syntax_type escape_type_G = 52; // for \G
-
-static const escape_syntax_type escape_type_property = 54; // for \p
-static const escape_syntax_type escape_type_not_property = 55; // for \P
-static const escape_syntax_type escape_type_named_char = 56; // for \N
-static const escape_syntax_type escape_type_extended_backref = 57; // for \g
-static const escape_syntax_type escape_type_reset_start_mark = 58; // for \K
-static const escape_syntax_type escape_type_line_ending = 59; // for \R
-
-static const escape_syntax_type syntax_max = 60;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_left_word = 20;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_right_word = 21;
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_start_buffer = 24; // for \`
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_end_buffer = 25; // for \'
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_control_a = 28; // for \a
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_e = 38; // for \e
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_E = 47; // for \Q\E
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_Q = 48; // for \Q\E
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_X = 49; // for \X
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_C = 50; // for \C
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_Z = 51; // for \Z
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_G = 52; // for \G
+
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_property = 54; // for \p
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_not_property = 55; // for \P
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_named_char = 56; // for \N
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_extended_backref = 57; // for \g
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_reset_start_mark = 58; // for \K
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type escape_type_line_ending = 59; // for \R
+
+BOOST_REGEX_MODULE_EXPORT BOOST_REGEX_STATIC_CONST escape_syntax_type syntax_max = 60;
}
}
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_iterator.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_iterator.hpp
index 6677019aca4..b7ac61a1b63 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_iterator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_iterator.hpp
@@ -19,6 +19,21 @@
#ifndef BOOST_REGEX_V5_U32REGEX_ITERATOR_HPP
#define BOOST_REGEX_V5_U32REGEX_ITERATOR_HPP
+#include <boost/regex/config.hpp>
+
+#ifndef BOOST_REGEX_STANDALONE
+
+#include <boost/config.hpp>
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+#pragma once
+#include <boost/regex/v5/icu.hpp>
+#endif
+
+#endif
+
+#include <boost/regex/v5/match_flags.hpp>
+#include <boost/regex/v5/match_results.hpp>
+
namespace boost{
template <class BidirectionalIterator>
@@ -35,6 +50,7 @@ class u32regex_iterator_implementation
public:
u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f)
: base(), end(last), re(*p), flags(f){}
+ u32regex_iterator_implementation(const u32regex_iterator_implementation&) = default;
bool init(BidirectionalIterator first)
{
base = first;
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_token_iterator.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_token_iterator.hpp
index 3d3032652f4..ea30de7c9cd 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_token_iterator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/u32regex_token_iterator.hpp
@@ -19,6 +19,18 @@
#ifndef BOOST_REGEX_V5_U32REGEX_TOKEN_ITERATOR_HPP
#define BOOST_REGEX_V5_U32REGEX_TOKEN_ITERATOR_HPP
+#include <boost/regex/config.hpp>
+
+#ifndef BOOST_REGEX_STANDALONE
+
+#include <boost/config.hpp>
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+#pragma once
+#include <boost/regex/v5/icu.hpp>
+#endif
+
+#endif
+
namespace boost{
#ifdef BOOST_REGEX_MSVC
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/unicode_iterator.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/unicode_iterator.hpp
index 9d3dd8b962d..d71737631fd 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/unicode_iterator.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/unicode_iterator.hpp
@@ -60,12 +60,14 @@ Accepts UTF-32 code points and forwards them on as UTF-16 code points.
#ifndef BOOST_REGEX_UNICODE_ITERATOR_HPP
#define BOOST_REGEX_UNICODE_ITERATOR_HPP
-#include <cstdint>
#include <boost/regex/config.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
+#include <cstdint>
#include <stdexcept>
#include <sstream>
#include <ios>
#include <limits.h> // CHAR_BIT
+#endif
#ifndef BOOST_REGEX_STANDALONE
#include <boost/throw_exception.hpp>
@@ -75,9 +77,9 @@ namespace boost{
namespace detail{
-static const std::uint16_t high_surrogate_base = 0xD7C0u;
-static const std::uint16_t low_surrogate_base = 0xDC00u;
-static const std::uint32_t ten_bit_mask = 0x3FFu;
+BOOST_REGEX_STATIC_CONST std::uint16_t high_surrogate_base = 0xD7C0u;
+BOOST_REGEX_STATIC_CONST std::uint16_t low_surrogate_base = 0xDC00u;
+BOOST_REGEX_STATIC_CONST std::uint32_t ten_bit_mask = 0x3FFu;
inline bool is_high_surrogate(std::uint16_t v)
{
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/w32_regex_traits.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/w32_regex_traits.hpp
index 16f7ee4eaa2..d6a56da533f 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/w32_regex_traits.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/w32_regex_traits.hpp
@@ -23,9 +23,11 @@
#include <boost/regex/pattern_except.hpp>
#include <boost/regex/v5/regex_traits_defaults.hpp>
+#ifndef BOOST_REGEX_AS_MODULE
#ifdef BOOST_HAS_THREADS
#include <mutex>
#endif
+#endif
#include <boost/regex/v5/primary_transform.hpp>
#include <boost/regex/v5/object_cache.hpp>
@@ -652,7 +654,7 @@ std::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_
} // BOOST_REGEX_DETAIL_NS
-template <class charT>
+BOOST_REGEX_MODULE_EXPORT template <class charT>
class w32_regex_traits
{
public:
diff --git a/contrib/restricted/boost/regex/include/boost/regex_fwd.hpp b/contrib/restricted/boost/regex/include/boost/regex_fwd.hpp
index 5efd7b35d03..f671b8077a2 100644
--- a/contrib/restricted/boost/regex/include/boost/regex_fwd.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex_fwd.hpp
@@ -24,11 +24,7 @@
#include <boost/regex/config.hpp>
#endif
-#ifdef BOOST_REGEX_CXX03
-#error #include <boost/regex/v4/regex_fwd.hpp>
-#else
#include <boost/regex/v5/regex_fwd.hpp>
-#endif
#endif
diff --git a/contrib/restricted/boost/regex/patches/allow-enum-indexing.patch b/contrib/restricted/boost/regex/patches/allow-enum-indexing.patch
new file mode 100644
index 00000000000..1c3ea5b4694
--- /dev/null
+++ b/contrib/restricted/boost/regex/patches/allow-enum-indexing.patch
@@ -0,0 +1,26 @@
+--- regex/include/boost/regex/v5/match_results.hpp (index)
++++ regex/include/boost/regex/v5/match_results.hpp (working tree)
+@@ -222,7 +222,7 @@ public:
+ {
+ return (*this)[sub].str();
+ }
+- private:
++private:
+ const_reference get_at(int sub) const
+ {
+ if(m_is_singular && m_subs.empty())
+@@ -239,8 +239,12 @@ public:
+ return m_null;
+ }
+ public:
+- template <class Integer>
+- typename std::enable_if<std::is_integral<Integer>::value, const_reference>::type operator[](Integer sub) const
++ template <class Index>
++ typename std::enable_if<
++ std::is_integral<Index>::value || std::is_enum<Index>::value,
++ const_reference
++ >::type
++ operator[](Index sub) const
+ {
+ return get_at(static_cast<int>(sub));
+ }
diff --git a/contrib/restricted/boost/regex/src/internals.hpp b/contrib/restricted/boost/regex/src/internals.hpp
deleted file mode 100644
index 3a15cc67cb1..00000000000
--- a/contrib/restricted/boost/regex/src/internals.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (c) 2011
- * 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)
- *
- */
-
-#ifndef BOOST_REGEX_SRC_INTERNALS_HPP
-#define BOOST_REGEX_SRC_INTERNALS_HPP
-
-enum
-{
- char_class_space=1<<0,
- char_class_print=1<<1,
- char_class_cntrl=1<<2,
- char_class_upper=1<<3,
- char_class_lower=1<<4,
- char_class_alpha=1<<5,
- char_class_digit=1<<6,
- char_class_punct=1<<7,
- char_class_xdigit=1<<8,
- char_class_alnum=char_class_alpha|char_class_digit,
- char_class_graph=char_class_alnum|char_class_punct,
- char_class_blank=1<<9,
- char_class_word=1<<10,
- char_class_unicode=1<<11,
- char_class_horizontal=1<<12,
- char_class_vertical=1<<13
-};
-
-#endif // BOOST_REGEX_SRC_INTERNALS_HPP
diff --git a/contrib/restricted/boost/regex/src/regex.cpp b/contrib/restricted/boost/regex/src/regex.cpp
deleted file mode 100644
index 8c251f60e19..00000000000
--- a/contrib/restricted/boost/regex/src/regex.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2004
- * 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.cpp
- * VERSION: see <boost/version.hpp>
- * DESCRIPTION: Misc boost::regbase member funnctions.
- */
-
-
-#define BOOST_REGEX_SOURCE
-
-#include <boost/regex/config.hpp>
-
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-
-#include <malloc.h>
-
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#ifndef NOMINMAX
-# define NOMINMAX
-#endif
-#define NOGDI
-#define NOUSER
-#include <windows.h>
-#include <stdexcept>
-#include <boost/regex/pattern_except.hpp>
-#error #include <boost/regex/v4/protected_call.hpp>
-
-namespace boost {
-namespace BOOST_REGEX_DETAIL_NS {
-
-static void execute_eror()
-{
- // we only get here after a stack overflow,
- // this has to be a separate proceedure because we
- // can't mix __try{}__except block with local objects
- // that have destructors:
- reset_stack_guard_page();
- std::runtime_error err("Out of stack space, while attempting to match a regular expression.");
- raise_runtime_error(err);
-}
-
-bool BOOST_REGEX_CALL abstract_protected_call::execute()const
-{
- __try{
- return this->call();
- }__except(EXCEPTION_STACK_OVERFLOW == GetExceptionCode())
- {
- execute_eror();
- }
- // We never really get here at all:
- return false;
-}
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page()
-{
-#if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300)
- _resetstkoflw();
-#else
- //
- // We need to locate the current page being used by the stack,
- // move to the page below it and then deallocate and protect
- // that page. Note that ideally we would protect only the lowest
- // stack page that has been allocated: in practice there
- // seems to be no easy way to locate this page, in any case as
- // long as the next page is protected, then Windows will figure
- // the rest out for us...
- //
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- MEMORY_BASIC_INFORMATION mi;
- DWORD previous_protection_status;
- //
- // this is an address in our stack space:
- //
- LPBYTE page = (LPBYTE)&page;
- //
- // Get the current memory page in use:
- //
- VirtualQuery(page, &mi, sizeof(mi));
- //
- // Go to the page one below this:
- //
- page = (LPBYTE)(mi.BaseAddress)-si.dwPageSize;
- //
- // Free and protect everything from the start of the
- // allocation range, to the end of the page below the
- // one in use:
- //
- if (!VirtualFree(mi.AllocationBase, (LPBYTE)page - (LPBYTE)mi.AllocationBase, MEM_DECOMMIT)
- || !VirtualProtect(page, si.dwPageSize, PAGE_GUARD | PAGE_READWRITE, &previous_protection_status))
- {
- throw std::bad_exception();
- }
-#endif
-}
-}
-} // namspaces
-#endif
-
-#if defined(BOOST_RE_USE_VCL) && defined(BOOST_REGEX_DYN_LINK)
-
-int WINAPI DllEntryPoint(HINSTANCE , unsigned long , void*)
-{
- return 1;
-}
-#endif
-
diff --git a/contrib/restricted/boost/regex/src/regex_debug.cpp b/contrib/restricted/boost/regex/src/regex_debug.cpp
deleted file mode 100644
index 9306a82e7ef..00000000000
--- a/contrib/restricted/boost/regex/src/regex_debug.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2004
- * 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_debug.cpp
- * VERSION: see <boost/version.hpp>
- * DESCRIPTION: Misc. debugging helpers.
- */
-
-
-#define BOOST_REGEX_SOURCE
-
-#include <boost/regex/config.hpp>
-
-
-//
-// regex configuration information: this prints out the settings used
-// when the library was built - include in debugging builds only:
-//
-#ifdef BOOST_REGEX_CONFIG_INFO
-
-#define print_macro regex_lib_print_macro
-#define print_expression regex_lib_print_expression
-#define print_byte_order regex_lib_print_byte_order
-#define print_sign regex_lib_print_sign
-#define print_compiler_macros regex_lib_print_compiler_macros
-#define print_stdlib_macros regex_lib_print_stdlib_macros
-#define print_platform_macros regex_lib_print_platform_macros
-#define print_boost_macros regex_lib_print_boost_macros
-#define print_separator regex_lib_print_separator
-#define OLD_MAIN regex_lib_main
-#define NEW_MAIN regex_lib_main2
-#define NO_RECURSE
-
-#include <libs/regex/test/config_info/regex_config_info.cpp>
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info()
-{
- std::cout << "\n\n";
- print_separator();
- std::cout << "Regex library build configuration:\n\n";
- regex_lib_main2();
-}
-
-#endif
-
-
-
-
-
diff --git a/contrib/restricted/boost/regex/src/static_mutex.cpp b/contrib/restricted/boost/regex/src/static_mutex.cpp
deleted file mode 100644
index 2c6d4b0c1fc..00000000000
--- a/contrib/restricted/boost/regex/src/static_mutex.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * 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 static_mutex.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares static_mutex lock type.
- */
-
-#define BOOST_REGEX_SOURCE
-#include <boost/regex/config.hpp>
-
-#if defined(BOOST_REGEX_CXX03)
-
-#include <boost/assert.hpp>
-
-#ifdef BOOST_HAS_THREADS
-
-#include <boost/regex/pending/static_mutex.hpp>
-
-#if defined(BOOST_HAS_WINTHREADS)
-#ifndef NOMINMAX
-# define NOMINMAX
-#endif
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#error #include <boost/static_assert.hpp>
-#endif
-
-
-namespace boost{
-
-#if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER)
-
-scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk)
-: m_mutex(m), m_have_lock(false)
-{
- if(lk)
- lock();
-}
-
-scoped_static_mutex_lock::~scoped_static_mutex_lock()
-{
- if(m_have_lock)
- unlock();
-}
-
-void scoped_static_mutex_lock::lock()
-{
- if(0 == m_have_lock)
- {
- // Client code will throw if this fails:
- m_have_lock = (pthread_mutex_lock(&(m_mutex.m_mutex)) == 0);
- }
-}
-
-void scoped_static_mutex_lock::unlock()
-{
- if(m_have_lock)
- {
- // If this fails there's nothing we can do except assert,
- // exceptions are out of the question as this code is called
- // from the lock's destructor:
- BOOST_VERIFY(pthread_mutex_unlock(&(m_mutex.m_mutex)) == 0);
- m_have_lock = false;
- }
-}
-
-#elif defined(BOOST_HAS_WINTHREADS)
-
-BOOST_STATIC_ASSERT(sizeof(LONG) == sizeof(boost::int32_t));
-
-scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk)
-: m_mutex(m), m_have_lock(false)
-{
- if(lk)
- lock();
-}
-
-scoped_static_mutex_lock::~scoped_static_mutex_lock()
-{
- if(m_have_lock)
- unlock();
-}
-
-void scoped_static_mutex_lock::lock()
-{
- if(0 == m_have_lock)
- {
-#if !defined(InterlockedCompareExchangePointer)
- while(0 != InterlockedCompareExchange(reinterpret_cast<void**>((boost::uint_least16_t*)&(m_mutex.m_mutex)), (void*)1, 0))
-#else
- while(0 != InterlockedCompareExchange(reinterpret_cast<LONG*>(&(m_mutex.m_mutex)), 1, 0))
-#endif
- {
- Sleep(0);
- }
- m_have_lock = true;
- }
-}
-
-void scoped_static_mutex_lock::unlock()
-{
- if(m_have_lock)
- {
-#if !defined(InterlockedCompareExchangePointer)
- InterlockedExchange((LONG*)&(m_mutex.m_mutex), 0);
-#else
- InterlockedExchange(reinterpret_cast<LONG*>(&(m_mutex.m_mutex)), 0);
-#endif
- m_have_lock = false;
- }
-}
-
-#else
-//
-// Portable version of a static mutex based on Boost.Thread library:
-//
-#include <stdlib.h>
-#include <boost/assert.hpp>
-
-boost::recursive_mutex* static_mutex::m_pmutex = 0;
-boost::once_flag static_mutex::m_once = BOOST_ONCE_INIT;
-
-extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex()
-{
- delete static_mutex::m_pmutex;
- static_mutex::m_pmutex = 0;
-}
-
-void static_mutex::init()
-{
- m_pmutex = new boost::recursive_mutex();
- int r = atexit(boost_regex_free_static_mutex);
- BOOST_ASSERT(0 == r);
-}
-
-scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& , bool lk)
-: m_plock(0), m_have_lock(false)
-{
- if(lk)
- lock();
-}
-
-scoped_static_mutex_lock::~scoped_static_mutex_lock()
-{
- if(m_have_lock)
- unlock();
- delete m_plock;
-}
-
-void scoped_static_mutex_lock::lock()
-{
- if(0 == m_have_lock)
- {
- boost::call_once(static_mutex::m_once,&static_mutex::init);
- if(0 == m_plock)
- m_plock = new boost::unique_lock<boost::recursive_mutex>(*static_mutex::m_pmutex, boost::defer_lock);
- m_plock->lock();
- m_have_lock = true;
- }
-}
-
-void scoped_static_mutex_lock::unlock()
-{
- if(m_have_lock)
- {
- m_plock->unlock();
- m_have_lock = false;
- }
-}
-
-#endif
-
-}
-
-#endif // BOOST_HAS_THREADS
-#endif
diff --git a/contrib/restricted/boost/regex/src/wide_posix_api.cpp b/contrib/restricted/boost/regex/src/wide_posix_api.cpp
index ae950251313..51b531253be 100644
--- a/contrib/restricted/boost/regex/src/wide_posix_api.cpp
+++ b/contrib/restricted/boost/regex/src/wide_posix_api.cpp
@@ -16,6 +16,7 @@
* DESCRIPTION: Implements the wide character POSIX API wrappers.
*/
+#define _CRT_SECURE_NO_WARNINGS // for std::wcscpy
#define BOOST_REGEX_SOURCE
#include <boost/regex/config.hpp>
@@ -169,11 +170,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
{
result = std::wcslen(wnames[code]) + 1;
if(buf_size >= result)
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
- ::wcscpy_s(buf, buf_size, wnames[code]);
-#else
std::wcscpy(buf, wnames[code]);
-#endif
return result;
}
return result;
@@ -193,11 +190,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
(boost::core::swprintf)(localbuf, 5, L"%d", i);
#endif
if(std::wcslen(localbuf) < buf_size)
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
- ::wcscpy_s(buf, buf_size, localbuf);
-#else
std::wcscpy(buf, localbuf);
-#endif
return std::wcslen(localbuf) + 1;
}
}
@@ -207,11 +200,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
(boost::core::swprintf)(localbuf, 5, L"%d", 0);
#endif
if(std::wcslen(localbuf) < buf_size)
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
- ::wcscpy_s(buf, buf_size, localbuf);
-#else
std::wcscpy(buf, localbuf);
-#endif
return std::wcslen(localbuf) + 1;
}
if(code <= (int)REG_E_UNKNOWN)
diff --git a/contrib/restricted/boost/regex/ya.make b/contrib/restricted/boost/regex/ya.make
index 802944f50e6..11c97d7f09a 100644
--- a/contrib/restricted/boost/regex/ya.make
+++ b/contrib/restricted/boost/regex/ya.make
@@ -6,9 +6,9 @@ LICENSE(BSL-1.0)
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(1.88.0)
+VERSION(1.89.0)
-ORIGINAL_SOURCE(https://github.com/boostorg/regex/archive/boost-1.88.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/regex/archive/boost-1.89.0.tar.gz)
PEERDIR(
contrib/libs/icu
@@ -46,9 +46,6 @@ ENDIF()
SRCS(
src/posix_api.cpp
- src/regex.cpp
- src/regex_debug.cpp
- src/static_mutex.cpp
src/wide_posix_api.cpp
)