PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/fusion/sequence/comparison/greater.hpp

http://hadesmem.googlecode.com/
C++ Header | 52 lines | 40 code | 5 blank | 7 comment | 0 complexity | 2db5760f65155f0332faa9133708b001 MD5 | raw file
 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_GREATER_05052005_0432)
 9#define FUSION_GREATER_05052005_0432
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/enable_comparison.hpp>
15
16#if defined(FUSION_DIRECT_OPERATOR_USAGE)
17#include <boost/fusion/sequence/comparison/detail/greater.hpp>
18#else
19#include <boost/fusion/sequence/comparison/less.hpp>
20#endif
21
22namespace boost { namespace fusion
23{
24    template <typename Seq1, typename Seq2>
25    inline bool
26    greater(Seq1 const& a, Seq2 const& b)
27    {
28#if defined(FUSION_DIRECT_OPERATOR_USAGE)
29        return detail::sequence_greater<Seq1 const, Seq2 const>::
30            call(fusion::begin(a), fusion::begin(b));
31#else
32        return (b < a);
33#endif
34    }
35
36    namespace operators
37    {
38        template <typename Seq1, typename Seq2>
39        inline typename
40            enable_if<
41                traits::enable_comparison<Seq1, Seq2>
42              , bool
43            >::type
44        operator>(Seq1 const& a, Seq2 const& b)
45        {
46            return fusion::greater(a, b);
47        }
48    }
49    using operators::operator>;
50}}
51
52#endif