Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-06-07 01:15:13


Author: steven_watanabe
Date: 2008-06-07 01:15:12 EDT (Sat, 07 Jun 2008)
New Revision: 46207
URL: http://svn.boost.org/trac/boost/changeset/46207

Log:
Attempt to resolve the Intel failures by using ice_or/ice_and
Text files modified:
   trunk/boost/units/scaled_base_unit.hpp | 20 +++++++++++---------
   1 files changed, 11 insertions(+), 9 deletions(-)

Modified: trunk/boost/units/scaled_base_unit.hpp
==============================================================================
--- trunk/boost/units/scaled_base_unit.hpp (original)
+++ trunk/boost/units/scaled_base_unit.hpp 2008-06-07 01:15:12 EDT (Sat, 07 Jun 2008)
@@ -16,6 +16,8 @@
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/less.hpp>
 #include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
 
 #include <boost/units/config.hpp>
 #include <boost/units/dimension.hpp>
@@ -105,8 +107,8 @@
 {
     template<class T0, class T1>
     struct apply : mpl::bool_<
- ((mpl::less<typename T0::system_type, T1>::value) ||
- ((boost::is_same<typename T0::system_type, T1>::value) && ((T0::scale_type::exponent::Numerator) < 0)))> {};
+ boost::type_traits::ice_or<(mpl::less<typename T0::system_type, T1>::value),
+ (boost::type_traits::ice_and<boost::is_same<typename T0::system_type, T1>::value, (T0::scale_type::exponent::Numerator) < 0>::value)>::value> {};
 };
 
 /// INTERNAL ONLY
@@ -115,8 +117,8 @@
 {
     template<class T0, class T1>
     struct apply : mpl::bool_<
- ((mpl::less<T0, typename T1::system_type>::value) ||
- ((boost::is_same<T0, typename T1::system_type>::value) && ((T1::scale_type::exponent::Numerator) > 0)))> {};
+ boost::type_traits::ice_or<(mpl::less<T0, typename T1::system_type>::value),
+ boost::type_traits::ice_and<(boost::is_same<T0, typename T1::system_type>::value), ((T1::scale_type::exponent::Numerator) > 0)>::value>::value> {};
 };
 
 /// INTERNAL ONLY
@@ -125,11 +127,11 @@
 {
     template<class T0, class T1>
     struct apply : mpl::bool_<
- ((mpl::less<typename T0::system_type, typename T1::system_type>::value) ||
- ((boost::is_same<typename T0::system_type, typename T1::system_type>::value) &&
- (((T0::scale_type::base) < (T1::scale_type::base)) ||
- (((T0::scale_type::base) == (T1::scale_type::base)) &&
- (mpl::less<typename T0::scale_type::exponent,typename T1::scale_type::exponent>::value)))))> {};
+ boost::type_traits::ice_or<(mpl::less<typename T0::system_type, typename T1::system_type>::value),
+ boost::type_traits::ice_and<(boost::is_same<typename T0::system_type, typename T1::system_type>::value),
+ boost::type_traits::ice_or<((T0::scale_type::base) < (T1::scale_type::base)),
+ boost::type_traits::ice_and<((T0::scale_type::base) == (T1::scale_type::base)),
+ (mpl::less<typename T0::scale_type::exponent,typename T1::scale_type::exponent>::value)>::value>::value>::value>::value> {};
 };
 
 } // namespace mpl


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk