1
//-----------------------------------------------------------------------------
2
// boost mpl/aux_/joint_iter.hpp header file
3
// See http://www.boost.org for updates, documentation, and revision history.
4
//-----------------------------------------------------------------------------
6
// Copyright (c) 2000-02
9
// Permission to use, copy, modify, distribute and sell this software
10
// and its documentation for any purpose is hereby granted without fee,
11
// provided that the above copyright notice appears in all copies and
12
// that both the copyright notice and this permission notice appear in
13
// supporting documentation. No representations are made about the
14
// suitability of this software for any purpose. It is provided "as is"
15
// without express or implied warranty.
17
#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
18
#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
20
#include "boost/mpl/aux_/lambda_spec.hpp"
21
#include "boost/mpl/aux_/config/ctps.hpp"
22
#include "boost/type_traits/is_same.hpp"
24
namespace boost { namespace mpl {
28
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
32
, typename LastIterator1
37
typedef Iterator1 base;
38
typedef typename base::category category;
45
typedef typename base::type type;
49
typename LastIterator1
52
struct joint_iter<LastIterator1,LastIterator1,Iterator2>
54
typedef Iterator2 base;
55
typedef typename base::category category;
62
typedef typename base::type type;
68
// forward decl. for 'joint_iter_impl'
71
, typename LastIterator1
76
template< bool > struct joint_iter_impl
80
, typename LastIterator1
85
typedef Iterator1 base;
86
// agurt, 16/nov/02: have to use 'Iterator1' instead of 'base' below
87
// to prevent 'base' and 'mpl::base' conflict on MSVC 6.0
88
typedef typename Iterator1::category category;
90
typename Iterator1::next
95
typedef typename Iterator1::type type;
99
template<> struct joint_iter_impl<true>
103
, typename LastIterator1
108
typedef Iterator2 base;
109
typedef typename Iterator2::category category;
113
, typename Iterator2::next
116
typedef typename Iterator2::type type;
123
, typename LastIterator1
127
: joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
128
::template result_<Iterator1,LastIterator1,Iterator2>
132
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
136
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::joint_iter)
138
}} // namespace boost::mpl
140
#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED