
From: brangdon@cix.compulink.co.uk (Dave Harris)
In-Reply-To: <dgmfeo$q1v$1@sea.gmane.org> kalita@poczta.onet.pl (Marcin Kalicinski) wrote (abridged):
#include <boost/config.hpp> #if defined(BOOST_MSVC) && defined(BOOST_DISABLE_ASSERTS) # define BOOST_ASSUME(e) __assume(e) #else # define BOOST_ASSUME(e) BOOST_ASSERT(e) #endif
That misses what BOOST_ASSUME should do when BOOST_DISABLE_ASSERTS is not defined. With BOOST_ASSERT enabled, BOOST_ASSUME should call both BOOST_ASSERT and __assume(): #include <boost/config.hpp> #if defined(BOOST_MSVC) # if defined(BOOST_DISABLE_ASSERTS) # define BOOST_ASSUME(e) __assume(e) # else # define BOOST_ASSUME(e) BOOST_ASSERT(e); __assume(e) # endif #else # define BOOST_ASSUME(e) BOOST_ASSERT(e) #endif (I haven't determined whether the definitions will work in all intended contexts; this can be considered conceptual.) -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;