1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
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
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/is_sequence.hpp>
15 #include <boost/fusion/sequence/intrinsic/size.hpp>
16 #include <boost/fusion/support/detail/is_mpl_sequence.hpp>
18 namespace boost { namespace fusion { namespace detail
20 template <typename Sequence>
21 struct is_native_fusion_sequence : is_base_of<sequence_root, Sequence> {};
23 template <typename Seq1, typename Seq2>
24 struct enable_equality
25 : mpl::or_<is_native_fusion_sequence<Seq1>, is_native_fusion_sequence<Seq2> >
28 template <typename Seq1, typename Seq2>
29 struct enable_comparison
31 mpl::or_<is_native_fusion_sequence<Seq1>, is_native_fusion_sequence<Seq2> >
32 , mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >