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 MSGPACK_PREPROCESSOR_DEBUG_ASSERT_HPP 15# define MSGPACK_PREPROCESSOR_DEBUG_ASSERT_HPP 16# 17# include <msgpack/preprocessor/config/config.hpp> 18# include <msgpack/preprocessor/control/expr_iif.hpp> 19# include <msgpack/preprocessor/control/iif.hpp> 20# include <msgpack/preprocessor/logical/not.hpp> 21# include <msgpack/preprocessor/tuple/eat.hpp> 22# 23# /* MSGPACK_PP_ASSERT */ 24# 25# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 26# define MSGPACK_PP_ASSERT MSGPACK_PP_ASSERT_D 27# else 28# define MSGPACK_PP_ASSERT(cond) MSGPACK_PP_ASSERT_D(cond) 29# endif 30# 31# define MSGPACK_PP_ASSERT_D(cond) MSGPACK_PP_IIF(MSGPACK_PP_NOT(cond), MSGPACK_PP_ASSERT_ERROR, MSGPACK_PP_TUPLE_EAT_1)(...) 32# define MSGPACK_PP_ASSERT_ERROR(x, y, z) 33# 34# /* MSGPACK_PP_ASSERT_MSG */ 35# 36# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 37# define MSGPACK_PP_ASSERT_MSG MSGPACK_PP_ASSERT_MSG_D 38# else 39# define MSGPACK_PP_ASSERT_MSG(cond, msg) MSGPACK_PP_ASSERT_MSG_D(cond, msg) 40# endif 41# 42# define MSGPACK_PP_ASSERT_MSG_D(cond, msg) MSGPACK_PP_EXPR_IIF(MSGPACK_PP_NOT(cond), msg) 43# 44# endif 45