makes begin< int_<I> > return void_

[SVN r34669]
This commit is contained in:
Tobias Schwinger
2006-07-22 15:08:37 +00:00
parent db83018d5b
commit 42bff20795

View File

@@ -17,12 +17,29 @@
#include <boost/mpl/begin_end_fwd.hpp>
#include <boost/mpl/sequence_tag_fwd.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/aux_/has_begin.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
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::has_begin<Sequence, true_>,
aux::begin_type<Sequence>, 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::has_begin<Sequence, true_>,
aux::end_type<Sequence>, void_>::type type;
};
};