From fef0cb1b3cf4879cf5d3f10983f20a34c253caf6 Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Tue, 16 May 2006 13:35:43 +0000 Subject: [PATCH] makes begin< int_<0> >::type compile [SVN r33978] --- include/boost/mpl/aux_/begin_end_impl.hpp | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/include/boost/mpl/aux_/begin_end_impl.hpp b/include/boost/mpl/aux_/begin_end_impl.hpp index 7fb10b2..f7723e9 100644 --- a/include/boost/mpl/aux_/begin_end_impl.hpp +++ b/include/boost/mpl/aux_/begin_end_impl.hpp @@ -17,12 +17,30 @@ #include #include #include +#include +#include #include #include #include namespace boost { namespace mpl { + +namespace aux { + +template< typename Sequence > +struct begin_type +{ + typedef typename Sequence::begin type; +}; +template< typename Sequence > +struct end_type +{ + typedef typename Sequence::end type; +}; + +} + // default implementation; conrete sequences might override it by // specializing either the 'begin_impl/end_impl' or the primary // 'begin/end' templates @@ -32,7 +50,8 @@ struct begin_impl { template< typename Sequence > struct apply { - typedef typename Sequence::begin type; + typedef typename eval_if, + aux::begin_type, void_>::type type; }; }; @@ -41,7 +60,8 @@ struct end_impl { template< typename Sequence > struct apply { - typedef typename Sequence::end type; + typedef typename eval_if, + aux::end_type, void_>::type type; }; };