Apply patch posted in 'attempt to patch floating_point_promotion on borland' message and wait for regression test results.

http://lists.boost.org/Archives/boost/2007/06/122727.php


[SVN r37919]
This commit is contained in:
Alexander Nasonov
2007-06-06 20:02:45 +00:00
parent 820cae7c2c
commit 6378e00d86
2 changed files with 30 additions and 2 deletions

View File

@ -70,13 +70,11 @@
#include "boost/type_traits/type_with_alignment.hpp"
#include "boost/type_traits/function_traits.hpp"
#include "boost/type_traits/aligned_storage.hpp"
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x564)
#include "boost/type_traits/floating_point_promotion.hpp"
#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
#include "boost/type_traits/integral_promotion.hpp"
#include "boost/type_traits/promote.hpp"
#endif
#endif // Borland
#include "boost/type_traits/ice.hpp"

View File

@ -8,6 +8,15 @@
#include <boost/config.hpp>
#ifdef BOOST_NO_CV_SPECIALIZATIONS
#include <boost/mpl/at.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/multiplies.hpp>
#include <boost/mpl/plus.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/type_traits/is_same.hpp>
#endif
// Should be the last #include
#include <boost/type_traits/detail/type_trait_def.hpp>
@ -15,6 +24,8 @@ namespace boost {
namespace type_traits { namespace detail {
#ifndef BOOST_NO_CV_SPECIALIZATIONS
template<class T>
struct floating_point_promotion
{
@ -45,6 +56,25 @@ struct floating_point_promotion<float const volatile>
typedef double const volatile type;
};
#else
template<class T>
struct floating_point_promotion
: mpl::at<
mpl::vector< T, double, double const, double volatile,
double const volatile >
, mpl::plus<
is_same<T, float>
, mpl::multiplies< is_same<T, float const> , mpl::int_<2> >
, mpl::multiplies< is_same<T, float volatile> , mpl::int_<3> >
, mpl::multiplies< is_same<T, float const volatile>, mpl::int_<4> >
>
>
{
};
#endif
} }
BOOST_TT_AUX_TYPE_TRAIT_DEF1(