From 4d7705aad820e0f9dd5b695b5c5d231dd7869638 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 3 Mar 2014 17:51:45 +0100 Subject: [PATCH] wrap pragma for MSVC --- example/cpp03/asymmetric/tree.h | 9 ++++----- example/cpp11/asymmetric/tree.h | 8 ++++---- src/detail/coroutine_context.cpp | 10 +++++++--- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/example/cpp03/asymmetric/tree.h b/example/cpp03/asymmetric/tree.h index 19852ef..72aaec5 100644 --- a/example/cpp03/asymmetric/tree.h +++ b/example/cpp03/asymmetric/tree.h @@ -15,10 +15,10 @@ #include #include -# if defined(BOOST_MSVC) +#if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable:4355) -# endif +#endif struct branch; struct leaf; @@ -117,9 +117,8 @@ void enumerate_leafs( boost::coroutines::asymmetric_coroutine< leaf & >::push_ty root->accept( v); } -# if defined(BOOST_MSVC) +#if defined(_MSC_VER) # pragma warning(pop) -# endif - +#endif #endif // TREE_H diff --git a/example/cpp11/asymmetric/tree.h b/example/cpp11/asymmetric/tree.h index 243455e..8fd1960 100644 --- a/example/cpp11/asymmetric/tree.h +++ b/example/cpp11/asymmetric/tree.h @@ -14,10 +14,10 @@ #include #include -# if defined(BOOST_MSVC) +#if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable:4355) -# endif +#endif struct branch; struct leaf; @@ -90,8 +90,8 @@ inline bool operator!=( leaf const& l, leaf const& r) { return l.value != r.value; } -# if defined(BOOST_MSVC) +#if defined(_MSC_VER) # pragma warning(pop) -# endif +#endif #endif // TREE_H diff --git a/src/detail/coroutine_context.cpp b/src/detail/coroutine_context.cpp index 7bfad1d..ff370a9 100644 --- a/src/detail/coroutine_context.cpp +++ b/src/detail/coroutine_context.cpp @@ -10,8 +10,10 @@ # include BOOST_ABI_PREFIX #endif -#pragma warning(push) -#pragma warning(disable:4355) +#if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4355) +#endif #if defined(BOOST_USE_SEGMENTED_STACKS) extern "C" { @@ -94,7 +96,9 @@ coroutine_context::jump( coroutine_context & other, intptr_t param, bool preserv }}} -#pragma warning(pop) +#if defined(_MSC_VER) +# pragma warning(pop) +#endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX