| 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_LESS_05052005_0432) |
| 9 | #define FUSION_LESS_05052005_0432 |
| 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/detail/less.hpp> |
| 16 | #include <boost/fusion/sequence/comparison/enable_comparison.hpp> |
| 17 | |
| 18 | namespace boost { namespace fusion |
| 19 | { |
| 20 | template <typename Seq1, typename Seq2> |
| 21 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
| 22 | inline bool |
| 23 | less(Seq1 const& a, Seq2 const& b) |
| 24 | { |
| 25 | return detail::sequence_less<Seq1 const, Seq2 const>:: |
| 26 | call(fusion::begin(a), fusion::begin(b)); |
| 27 | } |
| 28 | |
| 29 | namespace operators |
| 30 | { |
| 31 | template <typename Seq1, typename Seq2> |
| 32 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
| 33 | inline typename |
| 34 | boost::enable_if< |
| 35 | traits::enable_comparison<Seq1, Seq2> |
| 36 | , bool |
| 37 | >::type |
| 38 | operator<(Seq1 const& a, Seq2 const& b) |
| 39 | { |
| 40 | return fusion::less(a, b); |
| 41 | } |
| 42 | } |
| 43 | using operators::operator<; |
| 44 | }} |
| 45 | |
| 46 | #endif |
| 47 | |