]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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_NOT_EQUAL_TO_05052005_0431) | |
9 | #define FUSION_NOT_EQUAL_TO_05052005_0431 | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/sequence/intrinsic/begin.hpp> | |
13 | #include <boost/fusion/sequence/intrinsic/end.hpp> | |
14 | #include <boost/fusion/sequence/intrinsic/size.hpp> | |
15 | #include <boost/fusion/sequence/comparison/enable_comparison.hpp> | |
16 | ||
17 | #if defined(FUSION_DIRECT_OPERATOR_USAGE) | |
18 | #include <boost/fusion/sequence/comparison/detail/not_equal_to.hpp> | |
19 | #else | |
20 | #include <boost/fusion/sequence/comparison/equal_to.hpp> | |
21 | #endif | |
22 | ||
23 | namespace boost { namespace fusion | |
24 | { | |
25 | template <typename Seq1, typename Seq2> | |
26 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
27 | inline bool | |
28 | not_equal_to(Seq1 const& a, Seq2 const& b) | |
29 | { | |
30 | #if defined(FUSION_DIRECT_OPERATOR_USAGE) | |
31 | return result_of::size<Seq1>::value != result_of::size<Seq2>::value | |
32 | || detail::sequence_not_equal_to< | |
33 | Seq1 const, Seq2 const | |
34 | , result_of::size<Seq1>::value == result_of::size<Seq2>::value>:: | |
35 | call(fusion::begin(a), fusion::begin(b)); | |
36 | #else | |
37 | return !(a == b); | |
38 | #endif | |
39 | } | |
40 | ||
41 | namespace operators | |
42 | { | |
43 | template <typename Seq1, typename Seq2> | |
44 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
45 | inline typename | |
46 | boost::enable_if< | |
47 | traits::enable_equality<Seq1, Seq2> | |
48 | , bool | |
49 | >::type | |
50 | operator!=(Seq1 const& a, Seq2 const& b) | |
51 | { | |
52 | return fusion::not_equal_to(a, b); | |
53 | } | |
54 | } | |
55 | using operators::operator!=; | |
56 | }} | |
57 | ||
58 | #endif |