]> git.lyx.org Git - features.git/blobdiff - 3rdparty/boost/libs/regex/src/regex.cpp
Update to boost 1.72
[features.git] / 3rdparty / boost / libs / regex / src / regex.cpp
index ea20a06b546e0add4017ede6e37e498f241214b6..5a8bbdc04e5629c77e7f424e2e40e586372b4547 100644 (file)
@@ -28,7 +28,9 @@
 #  include <malloc.h>
 #endif
 #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-#define WIN32_LEAN_AND_MEAN
+#ifndef WIN32_LEAN_AND_MEAN
+#  define WIN32_LEAN_AND_MEAN
+#endif
 #ifndef NOMINMAX
 #  define NOMINMAX
 #endif
@@ -64,7 +66,7 @@ regex_error::regex_error(const std::string& s, regex_constants::error_type err,
 }
 
 regex_error::regex_error(regex_constants::error_type err) 
-   : std::runtime_error(::boost::re_detail::get_default_error_string(err))
+   : std::runtime_error(::boost::BOOST_REGEX_DETAIL_NS::get_default_error_string(err))
    , m_error_code(err)
    , m_position(0) 
 {
@@ -83,7 +85,7 @@ void regex_error::raise()const
 
 
 
-namespace re_detail{
+namespace BOOST_REGEX_DETAIL_NS{
 
 BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex)
 {
@@ -191,7 +193,9 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
 
 #else
 
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE)
+mem_block_cache block_cache = { { {nullptr} } } ;
+#elif defined(BOOST_HAS_THREADS)
 mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
 #else
 mem_block_cache block_cache = { 0, 0, };
@@ -211,7 +215,7 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
 
 #endif
 
-} // namespace re_detail
+} // namespace BOOST_REGEX_DETAIL_NS