]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/sequence/comparison/enable_comparison.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / sequence / comparison / enable_comparison.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3
4     Distributed under the Boost Software License, Version 1.0. (See accompanying
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_ENABLE_COMPARISON_09232005_1958)
8 #define FUSION_ENABLE_COMPARISON_09232005_1958
9
10 #include <boost/mpl/or.hpp>
11 #include <boost/mpl/and.hpp>
12 #include <boost/mpl/not.hpp>
13 #include <boost/mpl/equal_to.hpp>
14 #include <boost/fusion/support/sequence_base.hpp>
15 #include <boost/fusion/support/is_sequence.hpp>
16 #include <boost/fusion/sequence/intrinsic/size.hpp>
17
18 namespace boost { namespace fusion { namespace traits
19 {
20     template <typename Seq1, typename Seq2, typename Enable = void>
21     struct enable_equality
22         : mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
23     {};
24
25     template <typename Seq1, typename Seq2, typename Enable = void>
26     struct enable_comparison
27         : mpl::and_<
28             mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
29           , mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
30         >
31     {};
32 }}}
33
34 #endif