diff --git a/include/boost/mpl/joint_view.hpp b/include/boost/mpl/joint_view.hpp index 1f8d2ed..65e7e40 100644 --- a/include/boost/mpl/joint_view.hpp +++ b/include/boost/mpl/joint_view.hpp @@ -20,10 +20,28 @@ #include "boost/mpl/aux_/joint_iter.hpp" #include "boost/mpl/begin_end.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/plus.hpp" +#include "boost/mpl/size_fwd.hpp" namespace boost { namespace mpl { +namespace aux +{ + struct joint_view_tag; +} + +template <> +struct size_traits< aux::joint_view_tag > +{ + template < typename JointView > struct algorithm + : plus< + size + , size + > + {}; +}; + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence1_) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence2_) @@ -31,13 +49,17 @@ template< struct joint_view { private: + friend struct size_traits< aux::joint_view_tag >; + typedef Sequence1_ sequence1; + typedef Sequence2_ sequence2; + typedef typename begin::type first1_; typedef typename end::type last1_; typedef typename begin::type first2_; typedef typename end::type last2_; public: - struct tag; + typedef aux::joint_view_tag tag; typedef typename aux::joint_iter begin; typedef typename aux::joint_iter end; };