source: NonGTP/Boost/boost/spirit/fusion/iterator/equal_to.hpp @ 857

Revision 857, 1.6 KB checked in by igarcia, 18 years ago (diff)
Line 
1/*=============================================================================
2    Copyright (c) 2003 Joel de Guzman
3    Copyright (c) 2004 Peder Holt
4
5    Use, modification and distribution is subject to the Boost Software
6    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7    http://www.boost.org/LICENSE_1_0.txt)
8==============================================================================*/
9#if !defined(FUSION_ITERATOR_EQUAL_TO_HPP)
10#define FUSION_ITERATOR_EQUAL_TO_HPP
11
12#include <boost/spirit/fusion/detail/config.hpp>
13#include <boost/spirit/fusion/iterator/as_fusion_iterator.hpp>
14#include <boost/type_traits/is_same.hpp>
15#include <boost/type_traits/add_const.hpp>
16
17namespace boost { namespace fusion
18{
19    namespace meta
20    {
21        template <typename Tag>
22        struct equal_to_impl
23        {
24            template <typename I1, typename I2>
25            struct apply
26            {
27                typedef typename
28                    is_same<
29                        typename add_const<I1>::type
30                      , typename add_const<I2>::type
31                    >::type
32                type;
33                BOOST_STATIC_CONSTANT(bool, value = FUSION_GET_VALUE(type));
34            };
35        };
36
37        template <typename I1, typename I2>
38        struct equal_to
39            : detail::bool_base<
40              typename equal_to_impl<typename as_fusion_iterator<I1>::type::tag>::
41                template apply<
42                    typename as_fusion_iterator<I1>::type
43                  , typename as_fusion_iterator<I2>::type
44                >::type
45              > {};
46    }
47}}
48
49#endif
50
Note: See TracBrowser for help on using the repository browser.