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