/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman 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) ==============================================================================*/ #if !defined(FUSION_EQUAL_TO_05052005_1208) #define FUSION_EQUAL_TO_05052005_1208 #include #include #include #include #include #include namespace boost { namespace fusion { // Special tags: struct iterator_facade_tag; // iterator facade tag struct array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag namespace extension { template struct equal_to_impl { // default implementation template struct apply : is_same::type, typename add_const::type> {}; }; template <> struct equal_to_impl { template struct apply : I1::template equal_to {}; }; template <> struct equal_to_impl; template <> struct equal_to_impl; template <> struct equal_to_impl; } namespace result_of { template struct equal_to : extension::equal_to_impl::type>:: template apply {}; } namespace iterator_operators { template inline typename enable_if< mpl::and_, is_fusion_iterator > , bool >::type operator==(Iter1 const&, Iter2 const&) { return result_of::equal_to::value; } template inline typename enable_if< mpl::and_, is_fusion_iterator > , bool >::type operator!=(Iter1 const&, Iter2 const&) { return !result_of::equal_to::value; } } using iterator_operators::operator==; using iterator_operators::operator!=; }} #endif