606d2223a58bc3dfccc84c705bb4d32d2e329e39
[feed/packages.git] / libs / boost / patches / 020-regex.patch
1 --- a/boost/regex/v5/mem_block_cache.hpp
2 +++ b/boost/regex/v5/mem_block_cache.hpp
3 @@ -85,10 +85,10 @@ struct mem_block_node
4 struct mem_block_cache
5 {
6 // this member has to be statically initialsed:
7 - mem_block_node* next;
8 - unsigned cached_blocks;
9 + mem_block_node* next { nullptr };
10 + unsigned cached_blocks { 0 };
11 #ifdef BOOST_HAS_THREADS
12 - boost::static_mutex mut;
13 + std::mutex mut;
14 #endif
15
16 ~mem_block_cache()
17 @@ -133,11 +133,7 @@ struct mem_block_cache
18 }
19 static mem_block_cache& instance()
20 {
21 -#ifdef BOOST_HAS_THREADS
22 - static mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
23 -#else
24 - static mem_block_cache block_cache = { 0, 0, };
25 -#endif
26 + static mem_block_cache block_cache;
27 return block_cache;
28 }
29 };