Files
externals/linux/include/ActivBoost/preprocessor/debug/assert.hpp
T
2023-12-15 13:15:08 -05:00

45 lines
1.5 KiB
C++

# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * 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)
# */
#
# /* Revised by Paul Mensonides (2002) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef ACTIV_BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP
# define ACTIV_BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP
#
# include <ActivBoost/preprocessor/config/config.hpp>
# include <ActivBoost/preprocessor/control/expr_iif.hpp>
# include <ActivBoost/preprocessor/control/iif.hpp>
# include <ActivBoost/preprocessor/logical/not.hpp>
# include <ActivBoost/preprocessor/tuple/eat.hpp>
#
# /* ACTIV_BOOST_PP_ASSERT */
#
# if ~ACTIV_BOOST_PP_CONFIG_FLAGS() & ACTIV_BOOST_PP_CONFIG_EDG()
# define ACTIV_BOOST_PP_ASSERT ACTIV_BOOST_PP_ASSERT_D
# else
# define ACTIV_BOOST_PP_ASSERT(cond) ACTIV_BOOST_PP_ASSERT_D(cond)
# endif
#
# define ACTIV_BOOST_PP_ASSERT_D(cond) ACTIV_BOOST_PP_IIF(ACTIV_BOOST_PP_NOT(cond), ACTIV_BOOST_PP_ASSERT_ERROR, ACTIV_BOOST_PP_TUPLE_EAT_1)(...)
# define ACTIV_BOOST_PP_ASSERT_ERROR(x, y, z)
#
# /* ACTIV_BOOST_PP_ASSERT_MSG */
#
# if ~ACTIV_BOOST_PP_CONFIG_FLAGS() & ACTIV_BOOST_PP_CONFIG_EDG()
# define ACTIV_BOOST_PP_ASSERT_MSG ACTIV_BOOST_PP_ASSERT_MSG_D
# else
# define ACTIV_BOOST_PP_ASSERT_MSG(cond, msg) ACTIV_BOOST_PP_ASSERT_MSG_D(cond, msg)
# endif
#
# define ACTIV_BOOST_PP_ASSERT_MSG_D(cond, msg) ACTIV_BOOST_PP_EXPR_IIF(ACTIV_BOOST_PP_NOT(cond), msg)
#
# endif