Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/boost/mpl/joint_view.hpp @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.7 KB
RevLine 
[12]1
2#ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
3#define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
4
5// Copyright Aleksey Gurtovoy 2000-2004
6//
7// Distributed under the Boost Software License, Version 1.0.
8// (See accompanying file LICENSE_1_0.txt or copy at
9// http://www.boost.org/LICENSE_1_0.txt)
10//
11// See http://www.boost.org/libs/mpl for documentation.
12
13// $Source: /cvsroot/boost/boost/boost/mpl/joint_view.hpp,v $
14// $Date: 2004/10/02 19:08:57 $
15// $Revision: 1.8 $
16
17#include <boost/mpl/aux_/joint_iter.hpp>
18#include <boost/mpl/plus.hpp>
19#include <boost/mpl/size_fwd.hpp>
20#include <boost/mpl/begin_end.hpp>
21#include <boost/mpl/aux_/na_spec.hpp>
22
23namespace boost { namespace mpl {
24
25namespace aux {
26struct joint_view_tag;
27}
28
29template<>
30struct size_impl< aux::joint_view_tag >
31{
32    template < typename JointView > struct apply
33      : plus<
34            size<typename JointView::sequence1_>
35          , size<typename JointView::sequence2_>
36          >
37    {};
38};
39
40template<
41      typename BOOST_MPL_AUX_NA_PARAM(Sequence1_)
42    , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_)
43    >
44struct joint_view
45{
46    typedef typename mpl::begin<Sequence1_>::type   first1_;
47    typedef typename mpl::end<Sequence1_>::type     last1_;
48    typedef typename mpl::begin<Sequence2_>::type   first2_;
49    typedef typename mpl::end<Sequence2_>::type     last2_;
50
51    // agurt, 25/may/03: for the 'size_traits' implementation above
52    typedef Sequence1_ sequence1_;
53    typedef Sequence2_ sequence2_;
54
55    typedef joint_view type;
56    typedef aux::joint_view_tag tag;
57    typedef joint_iter<first1_,last1_,first2_>  begin;
58    typedef joint_iter<last1_,last1_,last2_>    end;
59};
60
61BOOST_MPL_AUX_NA_SPEC(2, joint_view)
62
63}}
64
65#endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.