Lockfree mem_block_cache only active if std::atomic is available

This commit is contained in:
Yucheng Low
2015-12-31 15:46:20 -08:00
parent 3f14031142
commit a0dfd81516
2 changed files with 3 additions and 16 deletions

View File

@ -192,7 +192,7 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
#else
#if defined(BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE)
mem_block_cache block_cache;
mem_block_cache block_cache = { { {nullptr} } } ;
#elif defined(BOOST_HAS_THREADS)
mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
#else