From 42bff20795982459d951592bfac6196ab819d88b Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Sat, 22 Jul 2006 15:08:37 +0000 Subject: [PATCH] makes begin< int_ > return void_ [SVN r34669] --- include/boost/mpl/aux_/begin_end_impl.hpp | 23 +++++++++++++++++++++-- 1 file changed, 21 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..9fa6912 100644 --- a/include/boost/mpl/aux_/begin_end_impl.hpp +++ b/include/boost/mpl/aux_/begin_end_impl.hpp @@ -17,12 +17,29 @@ #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 +49,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 +59,8 @@ struct end_impl { template< typename Sequence > struct apply { - typedef typename Sequence::end type; + typedef typename eval_if, + aux::end_type, void_>::type type; }; };