diff --git a/include/boost/spirit/home/classic/core/non_terminal/impl/static.hpp b/include/boost/spirit/home/classic/core/non_terminal/impl/static.hpp index ae2a66c50..c78365e79 100644 --- a/include/boost/spirit/home/classic/core/non_terminal/impl/static.hpp +++ b/include/boost/spirit/home/classic/core/non_terminal/impl/static.hpp @@ -15,7 +15,9 @@ #include #include +#ifdef BOOST_DISABLE_THREADS #include +#endif #include // for placement new @@ -69,7 +71,9 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN static_(Tag = Tag()) { +#ifdef BOOST_DISABLE_THREADS boost::call_once(&default_ctor::construct, constructed_); +#endif } operator reference() @@ -110,12 +114,14 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN template typename static_::storage_type static_::data_; +#ifdef BOOST_DISABLE_THREADS template #ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11 once_flag static_::constructed_ = BOOST_ONCE_INIT; #else once_flag static_::constructed_; #endif +#endif BOOST_SPIRIT_CLASSIC_NAMESPACE_END