Edit: /usr/include/boost/mpl/equal.hpp (2668B)
#ifndef BOOST_MPL_EQUAL_HPP_INCLUDED
#define BOOST_MPL_EQUAL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace mpl {
namespace aux {
template<
typename Predicate
, typename LastIterator1
, typename LastIterator2
>
struct equal_pred
{
template<
typename Iterator2
, typename Iterator1
>
struct apply
{
typedef typename and_<
not_< is_same >
, not_< is_same >
, aux::iter_apply2
>::type type;
};
};
template<
typename Sequence1
, typename Sequence2
, typename Predicate
>
struct equal_impl
{
typedef typename begin::type first1_;
typedef typename begin::type first2_;
typedef typename end::type last1_;
typedef typename end::type last2_;
typedef aux::iter_fold_if_impl<
first1_
, first2_
, next<>
, protect< aux::equal_pred >
, void_
, always
> fold_;
typedef typename fold_::iterator iter1_;
typedef typename fold_::state iter2_;
typedef and_<
is_same
, is_same
> result_;
typedef typename result_::type type;
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
, typename Predicate = is_same<_,_>
>
struct equal
: aux::msvc_eti_base<
typename aux::equal_impl::type
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2))
};
BOOST_MPL_AUX_NA_SPEC(2, equal)
}}
#endif // BOOST_MPL_EQUAL_HPP_INCLUDED