X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=boost%2Fboost%2Fcast.hpp;h=2615d183fad2fe288d717a462e9a41f9180c910a;hb=9ab24e95b9a0447c079fc5df86de9725ea11e53b;hp=c4ce8d3c088cb290f04978afd5394322bd3d131d;hpb=376aaac146989c2060f4159a16c7e8238b400088;p=lyx.git diff --git a/boost/boost/cast.hpp b/boost/boost/cast.hpp index c4ce8d3c08..2615d183fa 100644 --- a/boost/boost/cast.hpp +++ b/boost/boost/cast.hpp @@ -44,7 +44,7 @@ #define BOOST_CAST_HPP # include -# include +# include # include # include # include @@ -55,7 +55,7 @@ // appear in the function's argument list. // // TODO: Add this to config.hpp? -# if defined(BOOST_MSVC) && BOOST_MSVC <= 1200 // 1200 = VC6 +# if defined(BOOST_MSVC) && BOOST_MSVC < 1300 # define BOOST_EXPLICIT_DEFAULT_TARGET , ::boost::type* = 0 # else # define BOOST_EXPLICIT_DEFAULT_TARGET @@ -82,17 +82,19 @@ namespace boost // polymorphic_downcast ----------------------------------------------------// - // assert() checked polymorphic downcast. Crosscasts prohibited. + // BOOST_ASSERT() checked polymorphic downcast. Crosscasts prohibited. - // WARNING: Because this cast uses assert(), it violates the One Definition - // Rule if NDEBUG is inconsistently defined across translation units. + // WARNING: Because this cast uses BOOST_ASSERT(), it violates + // the One Definition Rule if used in multiple translation units + // where BOOST_DISABLE_ASSERTS, BOOST_ENABLE_ASSERT_HANDLER + // NDEBUG are defined inconsistently. // Contributed by Dave Abrahams template inline Target polymorphic_downcast(Source* x BOOST_EXPLICIT_DEFAULT_TARGET) { - assert( dynamic_cast(x) == x ); // detect logic error + BOOST_ASSERT( dynamic_cast(x) == x ); // detect logic error return static_cast(x); }