source: NonGTP/Boost/boost/preprocessor/comparison/less.hpp @ 857

Revision 857, 2.0 KB checked in by igarcia, 19 years ago (diff)
Line 
1# /* Copyright (C) 2001
2#  * Housemarque Oy
3#  * http://www.housemarque.com
4#  *
5#  * Distributed under the Boost Software License, Version 1.0. (See
6#  * accompanying file LICENSE_1_0.txt or copy at
7#  * http://www.boost.org/LICENSE_1_0.txt)
8#  */
9#
10# /* Revised by Paul Mensonides (2002) */
11#
12# /* See http://www.boost.org for most recent version. */
13#
14# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_HPP
15# define BOOST_PREPROCESSOR_COMPARISON_LESS_HPP
16#
17# include <boost/preprocessor/comparison/less_equal.hpp>
18# include <boost/preprocessor/comparison/not_equal.hpp>
19# include <boost/preprocessor/config/config.hpp>
20# include <boost/preprocessor/control/iif.hpp>
21# include <boost/preprocessor/logical/bitand.hpp>
22# include <boost/preprocessor/tuple/eat.hpp>
23#
24# /* BOOST_PP_LESS */
25#
26# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC())
27#    define BOOST_PP_LESS(x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL(x, y))
28# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
29#    define BOOST_PP_LESS(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y)
30# else
31#    define BOOST_PP_LESS(x, y) BOOST_PP_LESS_I(x, y)
32#    define BOOST_PP_LESS_I(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y)
33# endif
34#
35# /* BOOST_PP_LESS_D */
36#
37# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC())
38#    define BOOST_PP_LESS_D(d, x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D(d, x, y))
39# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
40#    define BOOST_PP_LESS_D(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y)
41# else
42#    define BOOST_PP_LESS_D(d, x, y) BOOST_PP_LESS_D_I(d, x, y)
43#    define BOOST_PP_LESS_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y)
44# endif
45#
46# endif
Note: See TracBrowser for help on using the repository browser.