• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/fusion/support/config.hpp>
11 #include <boost/mpl/or.hpp>
12 #include <boost/mpl/and.hpp>
13 #include <boost/mpl/not.hpp>
14 #include <boost/mpl/equal_to.hpp>
15 #include <boost/fusion/support/sequence_base.hpp>
16 #include <boost/fusion/support/is_sequence.hpp>
17 #include <boost/fusion/sequence/intrinsic/size.hpp>
18 
19 namespace boost { namespace fusion { namespace traits
20 {
21     template <typename Seq1, typename Seq2, typename Enable = void>
22     struct enable_equality
23         : mpl::and_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
24     {};
25 
26     template <typename Seq1, typename Seq2, typename Enable = void>
27     struct enable_comparison
28         : mpl::and_<
29             traits::is_sequence<Seq1>, traits::is_sequence<Seq2>
30           , mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
31         >
32     {};
33 }}}
34 
35 #endif
36