forked from boostorg/preprocessor
Added macros for testing miniumum (0) andf maximum numbers.
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MAXIMUM_NUMBER_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MAXIMUM_NUMBER_HPP
|
||||
#
|
||||
# /* BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/detail/maximum_number.hpp>
|
||||
#
|
||||
# if BOOST_PP_DETAIL_MAXIMUM_NUMBER == 256
|
||||
# include <boost/preprocessor/arithmetic/detail/limits/is_maximum_number_256.hpp>
|
||||
# elif BOOST_PP_DETAIL_MAXIMUM_NUMBER == 512
|
||||
# include <boost/preprocessor/arithmetic/detail/limits/is_maximum_number_512.hpp>
|
||||
# else
|
||||
# error Incorrect value for the BOOST_PP_LIMIT_MAG limit
|
||||
# endif
|
||||
#
|
||||
# endif
|
@ -0,0 +1,21 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MINIMUM_NUMBER_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MINIMUM_NUMBER_HPP
|
||||
#
|
||||
# /* BOOST_PP_DETAIL_IS_MINIMUM_NUMBER */
|
||||
#
|
||||
# include <boost/preprocessor/logical/not.hpp>
|
||||
#
|
||||
# define BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x) BOOST_PP_NOT(x)
|
||||
#
|
||||
# endif
|
22
include/boost/preprocessor/arithmetic/detail/Is_minmax.hpp
Normal file
22
include/boost/preprocessor/arithmetic/detail/Is_minmax.hpp
Normal file
@ -0,0 +1,22 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MINMAX_NUMBER_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MINMAX_NUMBER_HPP
|
||||
#
|
||||
# /* BOOST_PP_DETAIL_IS_MINMAX_NUMBER */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/detail/is_minimum_number.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
|
||||
#
|
||||
# define BOOST_PP_DETAIL_IS_MINMAX_NUMBER(x) (BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x))
|
||||
#
|
||||
# endif
|
@ -0,0 +1,21 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MINMAX_BOTH_NUMBER_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MINMAX_BOTH_NUMBER_HPP
|
||||
#
|
||||
# /* BOOST_PP_DETAIL_IS_MINMAX_BOTH_NUMBER */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/detail/is_minmax.hpp>
|
||||
#
|
||||
# define BOOST_PP_DETAIL_IS_MINMAX_BOTH_NUMBER(x,y) (BOOST_PP_DETAIL_IS_MINMAX_NUMBER(x),BOOST_PP_DETAIL_IS_MINMAX_NUMBER(y))
|
||||
#
|
||||
# endif
|
@ -0,0 +1,21 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MAXIMUM_NUMBER_256_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MAXIMUM_NUMBER_256_HPP
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
#
|
||||
# define BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_256_HELPER_, x))
|
||||
# define BOOST_PP_IS_256_HELPER_256
|
||||
#
|
||||
# endif
|
@ -0,0 +1,21 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MAXIMUM_NUMBER_512_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_IS_MAXIMUM_NUMBER_512_HPP
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
#
|
||||
# define BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_512_HELPER_, x))
|
||||
# define BOOST_PP_IS_512_HELPER_512
|
||||
#
|
||||
# endif
|
@ -0,0 +1,19 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2020. *
|
||||
# * Distributed under 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_MAXIMUM_NUMBER_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_MAXIMUM_NUMBER_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/limits.hpp>
|
||||
#
|
||||
# define BOOST_PP_DETAIL_MAXIMUM_NUMBER BOOST_PP_LIMIT_MAG
|
||||
#
|
||||
# endif
|
Reference in New Issue
Block a user