Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:41:56

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(FUSION_EQUAL_TO_IMPL_20060128_1423)
0009 #define FUSION_EQUAL_TO_IMPL_20060128_1423
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/mpl.hpp>
0013 
0014 #include <boost/mpl/lambda.hpp>
0015 #include <boost/mpl/and.hpp>
0016 #include <boost/mpl/transform_view.hpp>
0017 #include <boost/mpl/zip_view.hpp>
0018 #include <boost/mpl/vector.hpp>
0019 #include <boost/mpl/unpack_args.hpp>
0020 #include <boost/mpl/find_if.hpp>
0021 #include <boost/mpl/end.hpp>
0022 #include <boost/mpl/bool.hpp>
0023 #include <boost/mpl/equal_to.hpp>
0024 
0025 #include <boost/type_traits/is_same.hpp>
0026 
0027 #include <boost/fusion/iterator/equal_to.hpp>
0028 
0029 namespace boost { namespace fusion {
0030 
0031     struct zip_view_iterator_tag;
0032 
0033     namespace detail
0034     {
0035         template<typename It1, typename It2>
0036         struct zip_iterators_equal
0037         {
0038             typedef mpl::zip_view<mpl::vector2<typename It1::iterators, typename It2::iterators> > zipped;
0039             typedef mpl::transform_view<zipped, mpl::unpack_args<result_of::equal_to<mpl::_,mpl::_> > > transformed;
0040 
0041             typedef typename mpl::find_if<transformed, mpl::equal_to<mpl::_, mpl::false_> >::type found;
0042 
0043             typedef typename is_same<typename mpl::end<transformed>::type, found>::type type;
0044         };
0045     }
0046 
0047     namespace extension
0048     {
0049         template<typename Tag>
0050         struct equal_to_impl;
0051 
0052         template<>
0053         struct equal_to_impl<zip_view_iterator_tag>
0054         {
0055             template<typename It1, typename It2>
0056             struct apply
0057                 : detail::zip_iterators_equal<It1, It2>::type
0058             {};
0059         };
0060     }
0061 }}
0062 
0063 #endif