messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers bitand.hpp Source File

bitand.hpp

00001 # /* **************************************************************************
00002 #  *                                                                          *
00003 #  *     (C) Copyright Paul Mensonides 2002.
00004 #  *     Distributed under the Boost Software License, Version 1.0. (See
00005 #  *     accompanying file LICENSE_1_0.txt or copy at
00006 #  *     http://www.boost.org/LICENSE_1_0.txt)
00007 #  *                                                                          *
00008 #  ************************************************************************** */
00009 #
00010 # /* See http://www.boost.org for most recent version. */
00011 #
00012 # ifndef MSGPACK_PREPROCESSOR_LOGICAL_BITAND_HPP
00013 # define MSGPACK_PREPROCESSOR_LOGICAL_BITAND_HPP
00014 #
00015 # include <msgpack/preprocessor/config/config.hpp>
00016 #
00017 # /* MSGPACK_PP_BITAND */
00018 #
00019 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
00020 #    define MSGPACK_PP_BITAND(x, y) MSGPACK_PP_BITAND_I(x, y)
00021 # else
00022 #    define MSGPACK_PP_BITAND(x, y) MSGPACK_PP_BITAND_OO((x, y))
00023 #    define MSGPACK_PP_BITAND_OO(par) MSGPACK_PP_BITAND_I ## par
00024 # endif
00025 #
00026 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
00027 #    define MSGPACK_PP_BITAND_I(x, y) MSGPACK_PP_BITAND_ ## x ## y
00028 # else
00029 #    define MSGPACK_PP_BITAND_I(x, y) MSGPACK_PP_BITAND_ID(MSGPACK_PP_BITAND_ ## x ## y)
00030 #    define MSGPACK_PP_BITAND_ID(res) res
00031 # endif
00032 #
00033 # define MSGPACK_PP_BITAND_00 0
00034 # define MSGPACK_PP_BITAND_01 0
00035 # define MSGPACK_PP_BITAND_10 0
00036 # define MSGPACK_PP_BITAND_11 1
00037 #
00038 # endif