1 | /*=============================================================================
|
---|
2 | Copyright (c) 1999-2003 Jaakko Järvi
|
---|
3 | Copyright (c) 2001-2003 Joel de Guzman
|
---|
4 |
|
---|
5 | Use, modification and distribution is subject to the Boost Software
|
---|
6 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
---|
7 | http://www.boost.org/LICENSE_1_0.txt)
|
---|
8 | ==============================================================================*/
|
---|
9 | #if !defined(FUSION_SEQUENCE_GREATER_EQUAL_HPP)
|
---|
10 | #define FUSION_SEQUENCE_GREATER_EQUAL_HPP
|
---|
11 |
|
---|
12 | #include <boost/spirit/fusion/sequence/begin.hpp>
|
---|
13 | #include <boost/spirit/fusion/sequence/end.hpp>
|
---|
14 | #include <boost/spirit/fusion/sequence/detail/sequence_greater_equal.hpp>
|
---|
15 |
|
---|
16 | #ifdef FUSION_COMFORMING_COMPILER
|
---|
17 | #include <boost/utility/enable_if.hpp>
|
---|
18 | #include <boost/spirit/fusion/sequence/is_sequence.hpp>
|
---|
19 | #include <boost/spirit/fusion/sequence/as_fusion_sequence.hpp>
|
---|
20 | #endif
|
---|
21 |
|
---|
22 | namespace boost { namespace fusion
|
---|
23 | {
|
---|
24 | template <typename Seq1, typename Seq2>
|
---|
25 | inline bool
|
---|
26 | operator>=(sequence_base<Seq1> const& a, sequence_base<Seq2> const& b)
|
---|
27 | {
|
---|
28 | return detail::sequence_greater_equal<Seq1 const, Seq2 const>::
|
---|
29 | call(
|
---|
30 | fusion::begin(a.cast())
|
---|
31 | , fusion::begin(b.cast())
|
---|
32 | );
|
---|
33 | }
|
---|
34 |
|
---|
35 | #ifdef FUSION_COMFORMING_COMPILER
|
---|
36 |
|
---|
37 | template <typename Seq1, typename Seq2>
|
---|
38 | inline typename disable_if<fusion::is_sequence<Seq2>, bool>::type
|
---|
39 | operator>=(sequence_base<Seq1> const& a, Seq2 const& b)
|
---|
40 | {
|
---|
41 | return a >= as_fusion_sequence<Seq2>::convert_const(b);
|
---|
42 | }
|
---|
43 |
|
---|
44 | template <typename Seq1, typename Seq2>
|
---|
45 | inline typename disable_if<fusion::is_sequence<Seq1>, bool>::type
|
---|
46 | operator>=(Seq1 const& a, sequence_base<Seq2> const& b)
|
---|
47 | {
|
---|
48 | return as_fusion_sequence<Seq1>::convert_const(a) >= b;
|
---|
49 | }
|
---|
50 |
|
---|
51 | #endif
|
---|
52 | }}
|
---|
53 |
|
---|
54 | #endif
|
---|