Compare commits

...

3 Commits

Author SHA1 Message Date
Peter Dimov 7b2c714b55 Disable warning 4127 under msvc-12.0 and earlier 2025-10-20 20:58:49 +03:00
Peter Dimov 4777321ff2 Revert "Omit do {} while (false) for MSVC versions prior to 2015"
This reverts commit 40fda50ae1.
2025-10-20 20:27:17 +03:00
Peter Dimov d5a57eb725 Increase timeout in ci.yml for macos-13 2025-10-20 06:11:34 +03:00
2 changed files with 10 additions and 19 deletions
+1 -1
View File
@@ -628,7 +628,7 @@ jobs:
os: windows-11-arm
runs-on: ${{matrix.os}}
timeout-minutes: 45
timeout-minutes: 60
steps:
- name: Setup Boost
+9 -18
View File
@@ -551,22 +551,15 @@ inline void lwt_init()
#define BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2) ( ::boost::detail::test_all_eq_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2) )
#define BOOST_TEST_ALL_WITH(begin1, end1, begin2, end2, predicate) ( ::boost::detail::test_all_with_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2, predicate) )
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1900)
// The usual idiom for multiline macros. But disabled for MSVC versions
// prior to 2015, which would emit a "conditional expression is constant"
// warning that we could not silence with a _Pragma, despite this being
// the same thing described here:
//
// <https://learn.microsoft.com/en-us/cpp/preprocessor/pragma-directives-and-the-pragma-keyword?view=msvc-140>.
//
#define BOOST_LWT_DETAIL_DO_WHILE_FALSE( x ) do { x } while (false)
#if defined(BOOST_MSVC) && BOOST_MSVC < 1900
# define BOOST_LWT_DETAIL_WHILE_FALSE __pragma(warning(push)) __pragma(warning(disable:4127)) while(false) __pragma(warning(pop))
#else
#define BOOST_LWT_DETAIL_DO_WHILE_FALSE( x ) x
# define BOOST_LWT_DETAIL_WHILE_FALSE while(false)
#endif
#ifndef BOOST_NO_EXCEPTIONS
#define BOOST_TEST_THROWS( EXPR, EXCEP ) \
BOOST_LWT_DETAIL_DO_WHILE_FALSE( \
do { \
try { \
EXPR; \
::boost::detail::throw_failed_impl \
@@ -579,15 +572,14 @@ inline void lwt_init()
::boost::detail::throw_failed_impl \
(#EXPR, #EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
} \
)
//
} BOOST_LWT_DETAIL_WHILE_FALSE
#else
#define BOOST_TEST_THROWS( EXPR, EXCEP ) BOOST_LWT_DETAIL_DO_WHILE_FALSE((void)0;)
#define BOOST_TEST_THROWS( EXPR, EXCEP ) do {} BOOST_LWT_DETAIL_WHILE_FALSE
#endif
#ifndef BOOST_NO_EXCEPTIONS
# define BOOST_TEST_NO_THROW(EXPR) \
BOOST_LWT_DETAIL_DO_WHILE_FALSE( \
do { \
try { \
EXPR; \
} catch (const std::exception& e) { \
@@ -597,10 +589,9 @@ inline void lwt_init()
::boost::detail::no_throw_failed_impl \
(#EXPR, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
} \
)
//
} BOOST_LWT_DETAIL_WHILE_FALSE
#else
# define BOOST_TEST_NO_THROW(EXPR) BOOST_LWT_DETAIL_DO_WHILE_FALSE(EXPR;)
# define BOOST_TEST_NO_THROW(EXPR) do { EXPR; } BOOST_LWT_DETAIL_WHILE_FALSE
#endif
#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP