Hideaki Tai / msgpack-embedded

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers reverse.hpp Source File

reverse.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_REVERSE_HPP
00013 # define MSGPACK_PREPROCESSOR_SEQ_REVERSE_HPP
00014 #
00015 # include <msgpack/preprocessor/config/config.hpp>
00016 # include <msgpack/preprocessor/facilities/empty.hpp>
00017 # include <msgpack/preprocessor/seq/fold_left.hpp>
00018 #
00019 # /* MSGPACK_PP_SEQ_REVERSE */
00020 #
00021 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00022 #    define MSGPACK_PP_SEQ_REVERSE(seq) MSGPACK_PP_SEQ_FOLD_LEFT(MSGPACK_PP_SEQ_REVERSE_O, MSGPACK_PP_EMPTY, seq)()
00023 # else
00024 #    define MSGPACK_PP_SEQ_REVERSE(seq) MSGPACK_PP_SEQ_REVERSE_I(seq)
00025 #    define MSGPACK_PP_SEQ_REVERSE_I(seq) MSGPACK_PP_SEQ_FOLD_LEFT(MSGPACK_PP_SEQ_REVERSE_O, MSGPACK_PP_EMPTY, seq)()
00026 # endif
00027 #
00028 # define MSGPACK_PP_SEQ_REVERSE_O(s, state, elem) (elem) state
00029 #
00030 # /* MSGPACK_PP_SEQ_REVERSE_S */
00031 #
00032 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00033 #    define MSGPACK_PP_SEQ_REVERSE_S(s, seq) MSGPACK_PP_SEQ_FOLD_LEFT_ ## s(MSGPACK_PP_SEQ_REVERSE_O, MSGPACK_PP_EMPTY, seq)()
00034 # else
00035 #    define MSGPACK_PP_SEQ_REVERSE_S(s, seq) MSGPACK_PP_SEQ_REVERSE_S_I(s, seq)
00036 #    define MSGPACK_PP_SEQ_REVERSE_S_I(s, seq) MSGPACK_PP_SEQ_FOLD_LEFT_ ## s(MSGPACK_PP_SEQ_REVERSE_O, MSGPACK_PP_EMPTY, seq)()
00037 # endif
00038 #
00039 # endif