Hideaki Tai / msgpack-embedded

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers to_array.hpp Source File

to_array.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_TUPLE_TO_ARRAY_HPP
00014 # define MSGPACK_PREPROCESSOR_TUPLE_TO_ARRAY_HPP
00015 #
00016 # include <msgpack/preprocessor/cat.hpp>
00017 # include <msgpack/preprocessor/config/config.hpp>
00018 # include <msgpack/preprocessor/facilities/overload.hpp>
00019 # include <msgpack/preprocessor/tuple/size.hpp>
00020 # include <msgpack/preprocessor/variadic/size.hpp>
00021 #
00022 # /* MSGPACK_PP_TUPLE_TO_ARRAY */
00023 #
00024 # if MSGPACK_PP_VARIADICS
00025 #    if MSGPACK_PP_VARIADICS_MSVC
00026 #        define MSGPACK_PP_TUPLE_TO_ARRAY(...) MSGPACK_PP_TUPLE_TO_ARRAY_I(MSGPACK_PP_OVERLOAD(MSGPACK_PP_TUPLE_TO_ARRAY_, __VA_ARGS__), (__VA_ARGS__))
00027 #        define MSGPACK_PP_TUPLE_TO_ARRAY_I(m, args) MSGPACK_PP_TUPLE_TO_ARRAY_II(m, args)
00028 #        define MSGPACK_PP_TUPLE_TO_ARRAY_II(m, args) MSGPACK_PP_CAT(m ## args,)
00029 #        define MSGPACK_PP_TUPLE_TO_ARRAY_1(tuple) (MSGPACK_PP_TUPLE_SIZE(tuple), tuple)
00030 #    else
00031 #        define MSGPACK_PP_TUPLE_TO_ARRAY(...) MSGPACK_PP_OVERLOAD(MSGPACK_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__)
00032 #        define MSGPACK_PP_TUPLE_TO_ARRAY_1(tuple) (MSGPACK_PP_VARIADIC_SIZE tuple, tuple)
00033 #    endif
00034 #    define MSGPACK_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
00035 # else
00036 #    define MSGPACK_PP_TUPLE_TO_ARRAY(size, tuple) (size, tuple)
00037 # endif
00038 #
00039 # endif