--- boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp +++ boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp @@ -136,7 +136,11 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN { { #ifdef BOOST_SPIRIT_THREADSAFE +#ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11 static boost::once_flag been_here = BOOST_ONCE_INIT; +#else + static boost::once_flag been_here; +#endif boost::call_once(been_here, mutex_init); boost::mutex &mutex = mutex_instance(); boost::mutex::scoped_lock lock(mutex); --- boost/spirit/home/classic/core/non_terminal/impl/static.hpp +++ boost/spirit/home/classic/core/non_terminal/impl/static.hpp @@ -111,7 +111,11 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN typename static_::storage_type static_::data_; template +#ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11 once_flag static_::constructed_ = BOOST_ONCE_INIT; +#else + once_flag static_::constructed_; +#endif BOOST_SPIRIT_CLASSIC_NAMESPACE_END --- boost/spirit/home/classic/phoenix/closures.hpp +++ boost/spirit/home/classic/phoenix/closures.hpp @@ -419,7 +419,11 @@ private: closure_frame_holder_ref(holder_t* holder_ = 0) { #ifdef PHOENIX_THREADSAFE +#ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11 static boost::once_flag been_here = BOOST_ONCE_INIT; +#else + static boost::once_flag been_here; +#endif boost::call_once(been_here, tsp_frame_instance_init); boost::thread_specific_ptr &tsp_frame = tsp_frame_instance(); if (!tsp_frame.get())