/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. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(FUSION_GREATER_05052005_0432)
  8. #define FUSION_GREATER_05052005_0432
  9. #include <boost/fusion/sequence/intrinsic/begin.hpp>
  10. #include <boost/fusion/sequence/intrinsic/end.hpp>
  11. #include <boost/fusion/sequence/intrinsic/size.hpp>
  12. #include <boost/fusion/sequence/comparison/enable_comparison.hpp>
  13. #if defined(FUSION_DIRECT_OPERATOR_USAGE)
  14. #include <boost/fusion/sequence/comparison/detail/greater.hpp>
  15. #else
  16. #include <boost/fusion/sequence/comparison/less.hpp>
  17. #endif
  18. namespace boost { namespace fusion
  19. {
  20. template <typename Seq1, typename Seq2>
  21. inline bool
  22. greater(Seq1 const& a, Seq2 const& b)
  23. {
  24. #if defined(FUSION_DIRECT_OPERATOR_USAGE)
  25. return detail::sequence_greater<Seq1 const, Seq2 const>::
  26. call(fusion::begin(a), fusion::begin(b));
  27. #else
  28. return (b < a);
  29. #endif
  30. }
  31. namespace operators
  32. {
  33. template <typename Seq1, typename Seq2>
  34. inline typename
  35. enable_if<
  36. traits::enable_comparison<Seq1, Seq2>
  37. , bool
  38. >::type
  39. operator>(Seq1 const& a, Seq2 const& b)
  40. {
  41. return fusion::greater(a, b);
  42. }
  43. }
  44. using operators::operator>;
  45. }}
  46. #endif