messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers insert.hpp Source File

insert.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_SEQ_INSERT_HPP
00013 # define MSGPACK_PREPROCESSOR_SEQ_INSERT_HPP
00014 #
00015 # include <msgpack/preprocessor/config/config.hpp>
00016 # include <msgpack/preprocessor/seq/first_n.hpp>
00017 # include <msgpack/preprocessor/seq/rest_n.hpp>
00018 #
00019 # /* MSGPACK_PP_SEQ_INSERT */
00020 #
00021 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00022 #    define MSGPACK_PP_SEQ_INSERT(seq, i, elem) MSGPACK_PP_SEQ_FIRST_N(i, seq) (elem) MSGPACK_PP_SEQ_REST_N(i, seq)
00023 # else
00024 #    define MSGPACK_PP_SEQ_INSERT(seq, i, elem) MSGPACK_PP_SEQ_INSERT_I(seq, i, elem)
00025 #    define MSGPACK_PP_SEQ_INSERT_I(seq, i, elem) MSGPACK_PP_SEQ_FIRST_N(i, seq) (elem) MSGPACK_PP_SEQ_REST_N(i, seq)
00026 # endif
00027 #
00028 # endif