annotate DEPENDENCIES/generic/include/boost/fusion/sequence/comparison/detail/less_equal.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Copyright (c) 1999-2003 Jaakko Jarvi
Chris@16 3 Copyright (c) 2001-2011 Joel de Guzman
Chris@16 4
Chris@16 5 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7 ==============================================================================*/
Chris@16 8 #if !defined(FUSION_LESS_EQUAL_05052005_1141)
Chris@16 9 #define FUSION_LESS_EQUAL_05052005_1141
Chris@16 10
Chris@101 11 #include <boost/fusion/support/config.hpp>
Chris@16 12 #include <boost/mpl/bool.hpp>
Chris@16 13 #include <boost/fusion/iterator/deref.hpp>
Chris@16 14 #include <boost/fusion/iterator/next.hpp>
Chris@16 15 #include <boost/fusion/iterator/equal_to.hpp>
Chris@16 16 #include <boost/fusion/support/as_const.hpp>
Chris@16 17
Chris@16 18 namespace boost { namespace fusion { namespace detail
Chris@16 19 {
Chris@16 20 template <typename Seq1, typename Seq2>
Chris@16 21 struct sequence_less_equal
Chris@16 22 {
Chris@16 23 typedef typename result_of::end<Seq1>::type end1_type;
Chris@16 24 typedef typename result_of::end<Seq2>::type end2_type;
Chris@16 25
Chris@16 26 template <typename I1, typename I2>
Chris@101 27 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 28 static bool
Chris@16 29 call(I1 const&, I2 const&, mpl::true_)
Chris@16 30 {
Chris@16 31 return true;
Chris@16 32 }
Chris@16 33
Chris@16 34 template <typename I1, typename I2>
Chris@101 35 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 36 static bool
Chris@16 37 call(I1 const& a, I2 const& b, mpl::false_)
Chris@16 38 {
Chris@16 39 return extension::as_const(*a) <= extension::as_const(*b)
Chris@16 40 && (!(extension::as_const(*b) <= extension::as_const(*a)) ||
Chris@16 41 call(fusion::next(a), fusion::next(b)));
Chris@16 42 }
Chris@16 43
Chris@16 44 template <typename I1, typename I2>
Chris@101 45 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 46 static bool
Chris@16 47 call(I1 const& a, I2 const& b)
Chris@16 48 {
Chris@16 49 typename result_of::equal_to<I1, end1_type>::type eq;
Chris@16 50 return call(a, b, eq);
Chris@16 51 }
Chris@16 52 };
Chris@16 53 }}}
Chris@16 54
Chris@16 55 #endif