|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55648 - in branches/release/boost/mpl: . aux_
From: agurtovoy_at_[hidden]
Date: 2009-08-18 01:16:53
Author: agurtovoy
Date: 2009-08-18 01:16:53 EDT (Tue, 18 Aug 2009)
New Revision: 55648
URL: http://svn.boost.org/trac/boost/changeset/55648
Log:
Merge boost/mpl fixes from the trunk
Text files modified:
branches/release/boost/mpl/aux_/inserter_algorithm.hpp | 2 +-
branches/release/boost/mpl/aux_/push_back_impl.hpp | 11 +++++------
branches/release/boost/mpl/aux_/push_front_impl.hpp | 11 +++++------
branches/release/boost/mpl/for_each.hpp | 4 ++--
branches/release/boost/mpl/string.hpp | 6 +++---
5 files changed, 16 insertions(+), 18 deletions(-)
Modified: branches/release/boost/mpl/aux_/inserter_algorithm.hpp
==============================================================================
--- branches/release/boost/mpl/aux_/inserter_algorithm.hpp (original)
+++ branches/release/boost/mpl/aux_/inserter_algorithm.hpp 2009-08-18 01:16:53 EDT (Tue, 18 Aug 2009)
@@ -49,7 +49,7 @@
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
> \
struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \
- : if_< has_push_back<P1> \
+ : if_< has_push_back< typename clear<P1>::type> \
, aux::name##_impl< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
, back_inserter< typename clear<P1>::type > \
Modified: branches/release/boost/mpl/aux_/push_back_impl.hpp
==============================================================================
--- branches/release/boost/mpl/aux_/push_back_impl.hpp (original)
+++ branches/release/boost/mpl/aux_/push_back_impl.hpp 2009-08-18 01:16:53 EDT (Tue, 18 Aug 2009)
@@ -25,8 +25,7 @@
namespace boost { namespace mpl {
-template< typename Tag >
-struct has_push_back_impl;
+struct has_push_back_arg;
// agurt 05/feb/04: no default implementation; the stub definition is needed
// to enable the default 'has_push_back' implementation below
@@ -39,7 +38,7 @@
// if you've got an assert here, you are requesting a 'push_back'
// specialization that doesn't exist.
BOOST_MPL_ASSERT_MSG(
- ( boost::is_same< T, has_push_back_impl<T> >::value )
+ ( boost::is_same< T, has_push_back_arg >::value )
, REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST
, ( Sequence )
);
@@ -51,13 +50,13 @@
{
template< typename Seq > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
- : aux::has_type< push_back< Seq, has_push_back_impl<Tag> > >
+ : aux::has_type< push_back< Seq, has_push_back_arg > >
{
#else
{
- typedef aux::has_type< push_back< Seq, has_push_back_impl<Tag> > > type;
+ typedef aux::has_type< push_back< Seq, has_push_back_arg > > type;
BOOST_STATIC_CONSTANT(bool, value =
- (aux::has_type< push_back< Seq, has_push_back_impl<Tag> > >::value)
+ (aux::has_type< push_back< Seq, has_push_back_arg > >::value)
);
#endif
};
Modified: branches/release/boost/mpl/aux_/push_front_impl.hpp
==============================================================================
--- branches/release/boost/mpl/aux_/push_front_impl.hpp (original)
+++ branches/release/boost/mpl/aux_/push_front_impl.hpp 2009-08-18 01:16:53 EDT (Tue, 18 Aug 2009)
@@ -25,8 +25,7 @@
namespace boost { namespace mpl {
-template< typename Tag >
-struct has_push_front_impl;
+struct has_push_front_arg;
// agurt 05/feb/04: no default implementation; the stub definition is needed
// to enable the default 'has_push_front' implementation below
@@ -40,7 +39,7 @@
// if you've got an assert here, you are requesting a 'push_front'
// specialization that doesn't exist.
BOOST_MPL_ASSERT_MSG(
- ( boost::is_same< T, has_push_front_impl<T> >::value )
+ ( boost::is_same< T, has_push_front_arg >::value )
, REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST
, ( Sequence )
);
@@ -52,13 +51,13 @@
{
template< typename Seq > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
- : aux::has_type< push_front< Seq, has_push_front_impl<Tag> > >
+ : aux::has_type< push_front< Seq, has_push_front_arg > >
{
#else
{
- typedef aux::has_type< push_front< Seq, has_push_front_impl<Tag> > > type;
+ typedef aux::has_type< push_front< Seq, has_push_front_arg > > type;
BOOST_STATIC_CONSTANT(bool, value =
- (aux::has_type< push_front< Seq, has_push_front_impl<Tag> > >::value)
+ (aux::has_type< push_front< Seq, has_push_front_arg > >::value)
);
#endif
};
Modified: branches/release/boost/mpl/for_each.hpp
==============================================================================
--- branches/release/boost/mpl/for_each.hpp (original)
+++ branches/release/boost/mpl/for_each.hpp 2009-08-18 01:16:53 EDT (Tue, 18 Aug 2009)
@@ -76,7 +76,7 @@
typedef typename mpl::next<Iterator>::type iter;
for_each_impl<boost::is_same<iter,LastIterator>::value>
- ::execute((iter*)0, (LastIterator*)0, (TransformFunc*)0, f);
+ ::execute( static_cast<iter*>(0), static_cast<LastIterator*>(0), static_cast<TransformFunc*>(0), f);
}
};
@@ -98,7 +98,7 @@
typedef typename end<Sequence>::type last;
aux::for_each_impl< boost::is_same<first,last>::value >
- ::execute((first*)0, (last*)0, (TransformOp*)0, f);
+ ::execute(static_cast<first*>(0), static_cast<last*>(0), static_cast<TransformOp*>(0), f);
}
template<
Modified: branches/release/boost/mpl/string.hpp
==============================================================================
--- branches/release/boost/mpl/string.hpp (original)
+++ branches/release/boost/mpl/string.hpp 2009-08-18 01:16:53 EDT (Tue, 18 Aug 2009)
@@ -44,7 +44,6 @@
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <iterator>
#include <iterator> // for bidirectional_iterator_tag
#include <climits>
@@ -499,6 +498,7 @@
, back_ = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS))
};
+ typedef char value_type;
typedef string type;
typedef string_tag tag;
};
@@ -541,11 +541,11 @@
#undef M0
typedef c_str type;
- static char const value[];
+ static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1];
};
template<typename Sequence>
- char const c_str<Sequence>::value[] =
+ typename Sequence::value_type const c_str<Sequence>::value[BOOST_MPL_LIMIT_STRING_SIZE+1] =
{
#define M0(z, n, data) \
mpl::aux_::deref_unless<BOOST_PP_CAT(i, n), iend>::type::value,
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