Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/serialization/smart_cast.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/serialization/smart_cast.hpp Fri Sep 04 12:01:02 2015 +0100 +++ b/DEPENDENCIES/generic/include/boost/serialization/smart_cast.hpp Mon Sep 07 11:12:49 2015 +0100 @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_SMART_CAST_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -95,15 +95,15 @@ // cross casting will be selected this will work but will // not be the most efficient method. This will conflict with // the original smart_cast motivation. - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME mpl::and_< + typedef typename mpl::eval_if< + typename mpl::and_< mpl::not_<is_base_and_derived< - BOOST_DEDUCED_TYPENAME remove_reference< T >::type, + typename remove_reference< T >::type, U > >, mpl::not_<is_base_and_derived< U, - BOOST_DEDUCED_TYPENAME remove_reference< T >::type + typename remove_reference< T >::type > > >, // borland chokes w/o full qualification here @@ -131,7 +131,7 @@ mpl::identity<non_polymorphic> >::type::cast(u); #else - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< boost::is_polymorphic<U>, mpl::identity<polymorphic>, mpl::identity<non_polymorphic> @@ -170,7 +170,7 @@ template<class U> static T cast(U * u){ // if we're in debug mode - #if ! defined(NDEBUG) || defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) + #if 0 //! defined(NDEBUG) || defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) // do a checked dynamic cast return cross::cast(u); #else @@ -180,15 +180,15 @@ // not be the most efficient method. This will conflict with // the original smart_cast motivation. typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME mpl::and_< + typename mpl::eval_if< + typename mpl::and_< mpl::not_<is_base_and_derived< - BOOST_DEDUCED_TYPENAME remove_pointer< T >::type, + typename remove_pointer< T >::type, U > >, mpl::not_<is_base_and_derived< U, - BOOST_DEDUCED_TYPENAME remove_pointer< T >::type + typename remove_pointer< T >::type > > >, // borland chokes w/o full qualification here @@ -226,7 +226,7 @@ mpl::identity<non_polymorphic> >::type::cast(u); #else - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< boost::is_polymorphic<U>, mpl::identity<polymorphic>, mpl::identity<non_polymorphic> @@ -267,8 +267,8 @@ template<class T, class U> T smart_cast(U u) { typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME mpl::or_< + typename mpl::eval_if< + typename mpl::or_< boost::is_same<void *, U>, boost::is_same<void *, T>, boost::is_same<const void *, U>, @@ -276,10 +276,10 @@ >, mpl::identity<smart_cast_impl::void_pointer< T > >, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if<boost::is_pointer<U>, + typename mpl::eval_if<boost::is_pointer<U>, mpl::identity<smart_cast_impl::pointer< T > >, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if<boost::is_reference<U>, + typename mpl::eval_if<boost::is_reference<U>, mpl::identity<smart_cast_impl::reference< T > >, // else mpl::identity<smart_cast_impl::error< T >