mirror of
https://github.com/boostorg/core.git
synced 2025-07-31 05:17:22 +02:00
no_exceptions_support: Suppress conditional expression is constant warning
This commit is contained in:
@ -32,9 +32,21 @@
|
|||||||
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||||
# define BOOST_TRY { if ("")
|
# define BOOST_TRY { if ("")
|
||||||
# define BOOST_CATCH(x) else if (!"")
|
# define BOOST_CATCH(x) else if (!"")
|
||||||
# else
|
# elif !defined(_MSC_VER)
|
||||||
# define BOOST_TRY { if (true)
|
# define BOOST_TRY { if (true)
|
||||||
# define BOOST_CATCH(x) else if (false)
|
# define BOOST_CATCH(x) else if (false)
|
||||||
|
# else
|
||||||
|
// warning C4127: conditional expression is constant
|
||||||
|
# define BOOST_TRY { \
|
||||||
|
__pragma(warning(push)) \
|
||||||
|
__pragma(warning(disable: 4127)) \
|
||||||
|
if (true) \
|
||||||
|
__pragma(warning(pop))
|
||||||
|
# define BOOST_CATCH(x) else \
|
||||||
|
__pragma(warning(push)) \
|
||||||
|
__pragma(warning(disable: 4127)) \
|
||||||
|
if (false) \
|
||||||
|
__pragma(warning(pop))
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_RETHROW
|
# define BOOST_RETHROW
|
||||||
# define BOOST_CATCH_END }
|
# define BOOST_CATCH_END }
|
||||||
|
Reference in New Issue
Block a user