OLD | NEW |
(Empty) | |
| 1 /*============================================================================= |
| 2 Copyright (c) 1999-2003 Jaakko Jarvi |
| 3 Copyright (c) 2001-2006 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/detail/enable_comparison.hpp> |
| 16 |
| 17 namespace boost { namespace fusion |
| 18 { |
| 19 template <typename Seq1, typename Seq2> |
| 20 inline bool |
| 21 equal_to(Seq1 const& a, Seq2 const& b) |
| 22 { |
| 23 return result_of::size<Seq1>::value == result_of::size<Seq2>::value |
| 24 && detail::sequence_equal_to< |
| 25 Seq1 const, Seq2 const |
| 26 , result_of::size<Seq1>::value == result_of::size<Seq2>::value>:: |
| 27 call(fusion::begin(a), fusion::begin(b)); |
| 28 } |
| 29 |
| 30 namespace operators |
| 31 { |
| 32 template <typename Seq1, typename Seq2> |
| 33 inline typename |
| 34 enable_if< |
| 35 detail::enable_equality<Seq1, Seq2> |
| 36 , bool |
| 37 >::type |
| 38 operator==(Seq1 const& a, Seq2 const& b) |
| 39 { |
| 40 return fusion::equal_to(a, b); |
| 41 } |
| 42 } |
| 43 using operators::operator==; |
| 44 }} |
| 45 |
| 46 #endif |
OLD | NEW |