|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64650 - in sandbox/statistics/support/boost/assign/v2: put/modifier put/range put/wrapper ref/detail/convert_traits ref/detail/unwrap
From: erwann.rogard_at_[hidden]
Date: 2010-08-06 22:43:47
Author: e_r
Date: 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
New Revision: 64650
URL: http://svn.boost.org/trac/boost/changeset/64650
Log:
misc workaround for Ubuntu GCC 4.4
Text files modified:
sandbox/statistics/support/boost/assign/v2/put/modifier/deduce.hpp | 4 +-
sandbox/statistics/support/boost/assign/v2/put/range/convert.hpp | 2
sandbox/statistics/support/boost/assign/v2/put/wrapper/crtp.hpp | 8 +++---
sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/checking.hpp | 41 +++++++++++++++++++++++++++------------
sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/result.hpp | 1
sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/iterator.hpp | 2
sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/reference.hpp | 2
7 files changed, 38 insertions(+), 22 deletions(-)
Modified: sandbox/statistics/support/boost/assign/v2/put/modifier/deduce.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/put/modifier/deduce.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/deduce.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -46,13 +46,13 @@
template<>
struct case_<switch_tag::deduce_put,2> :
v2::mpl::wrap<
- put_tag::push,
+ v2::put_tag::push,
container_type_traits::has_push_deduced_value
>{};
template<>
struct case_<switch_tag::deduce_put,3> :
- v2::mpl::wrap<put_tag::push_back>{};
+ v2::mpl::wrap<v2::put_tag::push_back>{};
}// mpl
namespace put_aux{
Modified: sandbox/statistics/support/boost/assign/v2/put/range/convert.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/put/range/convert.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/put/range/convert.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -26,7 +26,7 @@
To operator|(From& from, convert_aux::adaptor<To> const& dummy)
{
To to;
- return to | adaptor::put_range( from );
+ return to | v2::adaptor::put_range( from );
}
}// convert_aux
Modified: sandbox/statistics/support/boost/assign/v2/put/wrapper/crtp.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/put/wrapper/crtp.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/put/wrapper/crtp.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -164,12 +164,12 @@
struct incr_lookup : Traits::template new_fun_tag<
functor_aux::identity,
- put_tag::incr_lookup
+ v2::put_tag::incr_lookup
>{};
struct repeat
{
- typedef put_tag::repeat<Tag> new_tag_;
+ typedef v2::put_tag::repeat<Tag> new_tag_;
typedef put_aux::modifier<new_tag_> modifier_;
typedef typename Traits::template new_tag<new_tag_>::type type;
};
@@ -207,7 +207,7 @@
modulo_incr_lookup()const{
return (*this)
% ( _fun = _identity )
- % ( _put_tag = put_tag::incr_lookup() );
+ % ( _put_tag = v2::put_tag::incr_lookup() );
}
template<typename N>
@@ -217,7 +217,7 @@
typedef typename result_of_modulo::repeat traits_;
typedef typename traits_::modifier_ modifier_;
return (
- (*this) % ( _put_tag = put_tag::repeat<Tag>() )
+ (*this) % ( _put_tag = v2::put_tag::repeat<Tag>() )
).copy_modifier( modifier_( n ) );
}
Modified: sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/checking.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/checking.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/checking.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -12,6 +12,7 @@
#include <boost/mpl/apply.hpp>
#include <boost/mpl/not.hpp>
#include <boost/config.hpp>
+#include <boost/static_assert.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/promote.hpp>
#include <boost/type_traits/is_same.hpp>
@@ -73,11 +74,11 @@
void do_check_impl(const T1&, const T2& ,const T3&)
{
- typedef typename boost::mpl::not_<
- boost::is_same<T1,T2>
- >::type not_same_;
-
- BOOST_STATIC_ASSERT(not_same_::value);
+ // Disable for Ubuntu 9.1 - GCC 4.4 (see workaround below).
+ // typedef typename boost::mpl::not_<
+ // boost::is_same<T1,T2>
+ // >::type not_same_;
+ // BOOST_STATIC_ASSERT(not_same_::value);
tester<const T1&, const T2&, const T3 >::test();
tester<const T1&, T2&, const T3 >::test();
@@ -102,7 +103,7 @@
};
-#define m(T1,T2) \
+#define m(T1, T2, T3) \
template<typename T> \
void do_check( \
typename boost::enable_if< \
@@ -110,16 +111,30 @@
>::type* = 0 \
) \
{ \
- typedef T1 t1_; \
- typedef T2 t2_; \
- distinct_values::arithmetic::do_check_impl( t1_(), t2_(), t2_() ); \
+ distinct_values::arithmetic::do_check_impl( T1(), T2(), T3() ); \
} \
/**/
-m(short , int)
-m(int , long)
-m(float , double)
-m(double , long double)
+// Works for Max OSX 10.6 GCC 4.2 but not Ubuntu 9.1 GCC 4.4
+// m(short , long, int)
+// m(int , long, long)
+// m(float , double, double)
+// typedef long double long_double_;
+// m(double , long_double_, long double)
+
+namespace workaround{
+ typedef boost::numeric::conversion_traits<short, int>::supertype a_;
+ typedef boost::numeric::conversion_traits<int, long>::supertype b_;
+ typedef boost::numeric::conversion_traits<float, double>::supertype c_;
+ typedef boost::numeric::conversion_traits<
+ double,long double>::supertype d_;
+}// workaround
+
+m(short , int, workaround::a_)
+m(int , long, workaround::b_)
+m(float , double, workaround::c_)
+typedef long double long_double_;
+m(double , long_double_, workaround::d_)
#undef m
}// arithmetic
Modified: sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/result.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/result.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/ref/detail/convert_traits/result.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -12,6 +12,7 @@
#include <boost/config.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
+#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_reference.hpp>
Modified: sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/iterator.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/iterator.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/iterator.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -63,7 +63,7 @@
{
typedef typename boost::iterator_reference<I>::type ref_;
typedef typename boost::is_convertible<ref_,R>::type is_convertible_;
- BOOST_MPL_ASSERT(is_convertible_);
+ BOOST_MPL_ASSERT(( is_convertible_ ));
}
};
Modified: sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/reference.hpp
==============================================================================
--- sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/reference.hpp (original)
+++ sandbox/statistics/support/boost/assign/v2/ref/detail/unwrap/reference.hpp 2010-08-06 22:43:45 EDT (Fri, 06 Aug 2010)
@@ -39,7 +39,7 @@
>{
static void test()
{
- BOOST_MPL_ASSERT_NOT( boost::is_reference<T> );
+ BOOST_MPL_ASSERT_NOT(( boost::is_reference<T> ));
};
};
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