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; }; };