/*============================================================================= Copyright (c) 1999-2003 Jaakko Järvi Copyright (c) 2001-2003 Joel de Guzman Copyright (c) 2004 Peder Holt Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_SEQUENCE_DETAIL_SEQUENCE_LESS_HPP) #define FUSION_SEQUENCE_DETAIL_SEQUENCE_LESS_HPP #include #include #include #include #include namespace boost { namespace fusion { namespace detail { namespace sequence_less_detail { template bool call(T const& self,I1 const& a, I2 const& b) { return *a < *b || !(*b < *a) && T::call(fusion::next(a), fusion::next(b)); } } template struct sequence_less { typedef typename meta::end::type end1_type; typedef typename meta::end::type end2_type; template static bool call(I1 const& a, I2 const& b) { typename meta::equal_to::type eq; return call(a, b, eq); } template static bool call(I1 const&, I2 const&, mpl::true_) { BOOST_STATIC_ASSERT((meta::equal_to::value)); return false; } template static bool call(I1 const& a, I2 const& b, mpl::false_) { return sequence_less_detail::call(sequence_less(),a,b); } }; }}} #endif