1
//-----------------------------------------------------------------------------
2
// boost mpl/equal.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_EQUAL_HPP_INCLUDED
18
#define BOOST_MPL_EQUAL_HPP_INCLUDED
20
#include "boost/mpl/aux_/iter_fold_if_impl.hpp"
21
#include "boost/mpl/aux_/iter_apply.hpp"
22
#include "boost/mpl/and.hpp"
23
#include "boost/mpl/not.hpp"
24
#include "boost/mpl/begin_end.hpp"
25
#include "boost/mpl/next.hpp"
26
#include "boost/mpl/always.hpp"
27
#include "boost/mpl/bool.hpp"
28
#include "boost/mpl/lambda.hpp"
29
#include "boost/mpl/bind.hpp"
30
#include "boost/mpl/apply.hpp"
31
#include "boost/mpl/void.hpp"
32
#include "boost/mpl/aux_/void_spec.hpp"
33
#include "boost/mpl/aux_/lambda_support.hpp"
34
#include "boost/type_traits/is_same.hpp"
43
, typename LastIterator1
44
, typename LastIterator2
54
typedef typename and_<
55
not_< is_same<Iterator1,LastIterator1> >
56
, not_< is_same<Iterator2,LastIterator2> >
57
, aux::iter_apply2<Predicate,Iterator1,Iterator2>
64
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN
67
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence1)
68
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence2)
69
, typename Predicate = is_same<_,_>
74
typedef typename begin<Sequence1>::type first1_;
75
typedef typename begin<Sequence2>::type first2_;
76
typedef typename end<Sequence1>::type last1_;
77
typedef typename end<Sequence2>::type last2_;
78
typedef typename lambda<Predicate>::type pred_;
80
typedef aux::iter_fold_if_impl<
84
, aux::equal_pred<pred_,last1_,last2_>
89
typedef typename fold_::iterator iter1_;
90
typedef typename fold_::state iter2_;
92
is_same<iter1_,last1_>
93
, is_same<iter2_,last2_>
97
typedef typename result_::type type;
99
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2))
102
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END
104
BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, equal)
109
#endif // BOOST_MPL_EQUAL_HPP_INCLUDED