Hideaki Tai / msgpack-embedded

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers to_seq.hpp Source File

to_seq.hpp

00001 # /* **************************************************************************
00002 #  *                                                                          *
00003 #  *     (C) Copyright Edward Diener 2011.                                    *
00004 #  *     (C) Copyright Paul Mensonides 2011.                                  *
00005 #  *     Distributed under the Boost Software License, Version 1.0. (See      *
00006 #  *     accompanying file LICENSE_1_0.txt or copy at                         *
00007 #  *     http://www.boost.org/LICENSE_1_0.txt)                                *
00008 #  *                                                                          *
00009 #  ************************************************************************** */
00010 #
00011 # /* See http://www.boost.org for most recent version. */
00012 #
00013 # ifndef MSGPACK_PREPROCESSOR_ARRAY_TO_SEQ_HPP
00014 # define MSGPACK_PREPROCESSOR_ARRAY_TO_SEQ_HPP
00015 #
00016 # include <msgpack/preprocessor/cat.hpp>
00017 # include <msgpack/preprocessor/config/config.hpp>
00018 # include <msgpack/preprocessor/array/size.hpp>
00019 # include <msgpack/preprocessor/control/if.hpp>
00020 # include <msgpack/preprocessor/tuple/to_seq.hpp>
00021 #
00022 # /* MSGPACK_PP_ARRAY_TO_SEQ */
00023 #
00024 #    define MSGPACK_PP_ARRAY_TO_SEQ(array) \
00025         MSGPACK_PP_IF \
00026             ( \
00027             MSGPACK_PP_ARRAY_SIZE(array), \
00028             MSGPACK_PP_ARRAY_TO_SEQ_DO, \
00029             MSGPACK_PP_ARRAY_TO_SEQ_EMPTY \
00030             ) \
00031         (array) \
00032 /**/
00033 #    define MSGPACK_PP_ARRAY_TO_SEQ_EMPTY(array)
00034 #
00035 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
00036 #    define MSGPACK_PP_ARRAY_TO_SEQ_DO(array) MSGPACK_PP_ARRAY_TO_SEQ_I(MSGPACK_PP_TUPLE_TO_SEQ, array)
00037 #    define MSGPACK_PP_ARRAY_TO_SEQ_I(m, args) MSGPACK_PP_ARRAY_TO_SEQ_II(m, args)
00038 #    define MSGPACK_PP_ARRAY_TO_SEQ_II(m, args) MSGPACK_PP_CAT(m ## args,)
00039 # elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
00040 #    define MSGPACK_PP_ARRAY_TO_SEQ_DO(array) MSGPACK_PP_ARRAY_TO_SEQ_I(array)
00041 #    define MSGPACK_PP_ARRAY_TO_SEQ_I(array) MSGPACK_PP_TUPLE_TO_SEQ ## array
00042 # else
00043 #    define MSGPACK_PP_ARRAY_TO_SEQ_DO(array) MSGPACK_PP_TUPLE_TO_SEQ array
00044 # endif
00045 #
00046 # endif