diff -r 000000000000 -r e4d67989cc36 ossrv_pub/boost_apis/boost/mpl/equal.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ossrv_pub/boost_apis/boost/mpl/equal.hpp Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,112 @@ + +#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. + +// $Source: /cvsroot/boost/boost/boost/mpl/equal.hpp,v $ +// $Date: 2004/09/02 15:40:41 $ +// $Revision: 1.6 $ + +#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