]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/sequence/comparison/equal_to.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / sequence / comparison / equal_to.hpp
1 /*=============================================================================
2     Copyright (c) 1999-2003 Jaakko Jarvi
3     Copyright (c) 2001-2011 Joel de Guzman
4
5     Distributed under the Boost Software License, Version 1.0. (See accompanying
6     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_EQUAL_TO_05052005_0431)
9 #define FUSION_EQUAL_TO_05052005_0431
10
11 #include <boost/fusion/sequence/intrinsic/begin.hpp>
12 #include <boost/fusion/sequence/intrinsic/end.hpp>
13 #include <boost/fusion/sequence/intrinsic/size.hpp>
14 #include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
15 #include <boost/fusion/sequence/comparison/enable_comparison.hpp>
16 #include <boost/config.hpp>
17
18 #if defined (BOOST_MSVC)
19 #  pragma warning(push)
20 #  pragma warning (disable: 4100) // unreferenced formal parameter
21 #endif
22
23 namespace boost { namespace fusion
24 {
25     template <typename Seq1, typename Seq2>
26     inline bool
27     equal_to(Seq1 const& a, Seq2 const& b)
28     {
29         return result_of::size<Seq1>::value == result_of::size<Seq2>::value
30             && detail::sequence_equal_to<
31             Seq1 const, Seq2 const
32             , result_of::size<Seq1>::value == result_of::size<Seq2>::value>::
33             call(fusion::begin(a), fusion::begin(b));
34     }
35
36     namespace operators
37     {
38         template <typename Seq1, typename Seq2>
39         inline typename
40             boost::enable_if<
41                 traits::enable_equality<Seq1, Seq2>
42               , bool
43             >::type
44         operator==(Seq1 const& a, Seq2 const& b)
45         {
46             return fusion::equal_to(a, b);
47         }
48     }
49     using operators::operator==;
50 }}
51
52 #if defined (BOOST_MSVC)
53 #  pragma warning(pop)
54 #endif
55
56 #endif