Index: aux_/filter_iter.hpp =================================================================== --- aux_/filter_iter.hpp (revision 67512) +++ aux_/filter_iter.hpp (working copy) @@ -59,6 +59,8 @@ { typedef Iterator base; typedef forward_iterator_tag category; + typedef forward_iterator_tag tag; + typedef typename aux::next_filter_iter< typename mpl::next::type , LastIterator @@ -76,6 +78,7 @@ { typedef LastIterator base; typedef forward_iterator_tag category; + typedef forward_iterator_tag tag; }; #else @@ -92,6 +95,7 @@ { typedef Iterator base; typedef forward_iterator_tag category; + typedef forward_iterator_tag tag; typedef typename next_filter_iter< typename mpl::next::type , LastIterator @@ -114,6 +118,7 @@ { typedef Iterator base; typedef forward_iterator_tag category; + typedef forward_iterator_tag tag; }; }; Index: aux_/integral_wrapper.hpp =================================================================== --- aux_/integral_wrapper.hpp (revision 67512) +++ aux_/integral_wrapper.hpp (working copy) @@ -56,6 +56,7 @@ // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), // while some other don't like 'value + 1' (Borland), and some don't like // either +#ifndef BOOST_MPL_NEXT_PRIOR_EXT #if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) private: BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); @@ -72,7 +73,12 @@ typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next; typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; #endif - +#else + template + struct clone { + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, M) ) type; + }; +#endif // enables uniform function call syntax for families of overloaded // functions that return objects of both arithmetic ('int', 'long', // 'double', etc.) and wrapped integral types (for an example, see Index: aux_/single_element_iter.hpp =================================================================== --- aux_/single_element_iter.hpp (revision 67512) +++ aux_/single_element_iter.hpp (working copy) @@ -37,6 +37,7 @@ struct sel_iter { typedef random_access_iterator_tag category; + typedef category tag; typedef sel_iter next; typedef T type; }; @@ -45,6 +46,7 @@ struct sel_iter { typedef random_access_iterator_tag category; + typedef category tag; typedef sel_iter prior; }; Index: aux_/transform_iter.hpp =================================================================== --- aux_/transform_iter.hpp (revision 67512) +++ aux_/transform_iter.hpp (working copy) @@ -37,6 +37,7 @@ { typedef Iterator base; typedef forward_iterator_tag category; + typedef category tag; typedef transform_iter< typename mpl::next::type,LastIterator,F > next; typedef typename apply1< @@ -53,6 +54,7 @@ { typedef LastIterator base; typedef forward_iterator_tag category; + typedef category tag; }; #else @@ -76,6 +78,7 @@ { typedef Iterator base; typedef forward_iterator_tag category; + typedef category tag; typedef transform_iter< typename mpl::next::type,LastIterator,F > next; typedef typename apply1< @@ -97,6 +100,7 @@ { typedef Iterator base; typedef forward_iterator_tag category; + typedef category tag; }; }; Index: next_prior.hpp =================================================================== --- next_prior.hpp (revision 67512) +++ next_prior.hpp (working copy) @@ -23,12 +23,47 @@ BOOST_MPL_AUX_COMMON_NAME_WKND(next) BOOST_MPL_AUX_COMMON_NAME_WKND(prior) +#ifdef BOOST_MPL_NEXT_PRIOR_EXT + +template< typename T > struct next_tag +{ + typedef typename T::tag type; +}; + +template< typename T > struct prior_tag +{ + typedef typename T::tag type; +}; + +template< typename Tag > struct next_impl +{ + template< typename T > struct apply + { + typedef typename T::next type; + }; +}; +template struct prior_impl +{ + template< typename T > struct apply + { + typedef typename T::prior type; + }; +}; + +#endif + template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct next { +#ifndef BOOST_MPL_NEXT_PRIOR_EXT typedef typename T::next type; +#else + typedef typename next_tag::type tag_; + typedef typename next_impl< tag_ > + ::template apply< T >::type type; +#endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) }; @@ -37,13 +72,64 @@ > struct prior { +#ifndef BOOST_MPL_NEXT_PRIOR_EXT typedef typename T::prior type; +#else + typedef typename prior_tag::type tag_; + typedef typename prior_impl< tag_ > + ::template apply< T >::type type; +#endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) }; BOOST_MPL_AUX_NA_SPEC(1, next) BOOST_MPL_AUX_NA_SPEC(1, prior) + +#ifdef BOOST_MPL_NEXT_PRIOR_EXT + +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) +namespace aux { +template< typename T, T n > struct next_wknd +{ + BOOST_STATIC_CONSTANT(T, value = n+1); + typedef T::template clone type; + +}; +template< typename T, T n > struct prior_wknd +{ + BOOST_STATIC_CONSTANT(T, value = n-1); + typedef T::template clone type; +}; +} +#endif + +template<> struct next_impl +{ +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) + template< typename N > struct apply + : aux::next_wknd< typename N, N::value > +#else + template< typename N > struct apply + : N::template clone<(N::value+1) > +#endif + { + }; +}; +template<> struct prior_impl +{ +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) + template< typename N > struct apply + : aux::prior_wknd< typename N, N::value > +#else + template< typename N > struct apply + : N::template clone<(N::value-1) > +#endif + { + }; +}; + +#endif }} #endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED Index: string.hpp =================================================================== --- string.hpp (revision 67512) +++ string.hpp (working copy) @@ -183,8 +183,12 @@ template struct apply { + // This is needed on GCC > 4.3 to avoid + // ..\..\../boost/mpl/string.hpp:186:13: error: '(((unsigned int)mpl_::size_t<11u>::value) != 32u)' is not a valid template argument for type 'bool' because it is a non-constant expression + static const bool cnd=(BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value); BOOST_MPL_ASSERT_MSG( - (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) + (cnd) + //~ (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) , PUSH_BACK_FAILED_MPL_STRING_IS_FULL , (Sequence) ); @@ -506,6 +510,7 @@ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) }; \ typedef mpl::string string; \ typedef std::bidirectional_iterator_tag category; \ + typedef category tag; \ typedef \ mpl::string_iterator \ next; \ @@ -520,6 +525,7 @@ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) }; \ typedef mpl::string string; \ typedef std::bidirectional_iterator_tag category; \ + typedef category tag; \ typedef \ mpl::string_iterator \ next; \ Index: zip_view.hpp =================================================================== --- zip_view.hpp (revision 67512) +++ zip_view.hpp (working copy) @@ -29,6 +29,8 @@ struct zip_iterator { typedef forward_iterator_tag category; + typedef category tag; + typedef typename transform1< IteratorSeq , deref<_1>