blob: 3bed6a4041048f3c5ab5bc05def20c8e223be4b1 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
3
4// Copyright Aleksey Gurtovoy 2000-2004
5//
6// Distributed under the Boost Software License, Version 1.0.
7// (See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt)
9//
10// See http://www.boost.org/libs/mpl for documentation.
11
12// $Id: comparison_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
13// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
14// $Revision: 49267 $
15
Jeff Thompson3d613fd2013-10-15 15:39:04 -070016#if !defined(NDNBOOST_MPL_PREPROCESSING_MODE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070017# include <ndnboost/mpl/bool.hpp>
18# include <ndnboost/mpl/aux_/value_wknd.hpp>
19#endif
20
21#if !defined(AUX778076_OP_PREFIX)
22# define AUX778076_OP_PREFIX AUX778076_OP_NAME
23#endif
24
25#define AUX778076_OP_ARITY 2
26
27#include <ndnboost/mpl/aux_/numeric_op.hpp>
28#include <ndnboost/mpl/aux_/config/static_constant.hpp>
29#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
30
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031#if !defined(NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
32 && !defined(NDNBOOST_MPL_PREPROCESSING_MODE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070033
Jeff Thompson3d613fd2013-10-15 15:39:04 -070034# define NDNBOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp
Jeff Thompsona28eed82013-08-22 16:21:10 -070035# include <ndnboost/mpl/aux_/include_preprocessed.hpp>
36
37#else
38
39# include <ndnboost/mpl/aux_/config/integral.hpp>
40# include <ndnboost/preprocessor/cat.hpp>
41
42namespace ndnboost { namespace mpl {
43
44// MSVC workaround: implement less in terms of greater
45#if 0 AUX778076_OP_TOKEN 1 && !(1 AUX778076_OP_TOKEN 0) && !(0 AUX778076_OP_TOKEN 0)
46# define AUX778076_OP(N1, N2) \
Jeff Thompson3d613fd2013-10-15 15:39:04 -070047 ( NDNBOOST_MPL_AUX_VALUE_WKND(N2)::value > NDNBOOST_MPL_AUX_VALUE_WKND(N1)::value ) \
Jeff Thompsona28eed82013-08-22 16:21:10 -070048/**/
49#else
50# define AUX778076_OP(N1, N2) \
Jeff Thompson3d613fd2013-10-15 15:39:04 -070051 ( NDNBOOST_MPL_AUX_VALUE_WKND(N1)::value \
52 AUX778076_OP_TOKEN NDNBOOST_MPL_AUX_VALUE_WKND(N2)::value \
Jeff Thompsona28eed82013-08-22 16:21:10 -070053 ) \
54/**/
55#endif
56
57template<>
58struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
59{
60 template< typename N1, typename N2 > struct apply
Jeff Thompson3d613fd2013-10-15 15:39:04 -070061#if !defined(NDNBOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
Jeff Thompsona28eed82013-08-22 16:21:10 -070062 : bool_< AUX778076_OP(N1, N2) >
63 {
64#else
65 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070066 NDNBOOST_STATIC_CONSTANT(bool, value = AUX778076_OP(N1, N2));
Jeff Thompsona28eed82013-08-22 16:21:10 -070067 typedef bool_<value> type;
68#endif
69 };
70};
71
72#undef AUX778076_OP
73
74}}
75
Jeff Thompson3d613fd2013-10-15 15:39:04 -070076#endif // NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
Jeff Thompsona28eed82013-08-22 16:21:10 -070077
78#undef AUX778076_OP_TAG_NAME
79#undef AUX778076_OP_IMPL_NAME
80#undef AUX778076_OP_ARITY
81#undef AUX778076_OP_PREFIX
82#undef AUX778076_OP_NAME
83#undef AUX778076_OP_TOKEN