messagepack implementation for embedded systems (mbed / arduino)
Dependents: hello_message_pack
remove.hpp
00001 # /* ************************************************************************** 00002 # * * 00003 # * (C) Copyright Edward Diener 2013. 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_TUPLE_REMOVE_HPP 00013 # define MSGPACK_PREPROCESSOR_TUPLE_REMOVE_HPP 00014 # 00015 # include <msgpack/preprocessor/config/config.hpp> 00016 # 00017 # if MSGPACK_PP_VARIADICS 00018 # 00019 # include <msgpack/preprocessor/array/remove.hpp> 00020 # include <msgpack/preprocessor/array/to_tuple.hpp> 00021 # include <msgpack/preprocessor/comparison/greater.hpp> 00022 # include <msgpack/preprocessor/control/iif.hpp> 00023 # include <msgpack/preprocessor/tuple/size.hpp> 00024 # include <msgpack/preprocessor/tuple/to_array.hpp> 00025 # 00026 # /* MSGPACK_PP_TUPLE_REMOVE */ 00027 # 00028 # define MSGPACK_PP_TUPLE_REMOVE(tuple, i) \ 00029 MSGPACK_PP_IIF \ 00030 ( \ 00031 MSGPACK_PP_GREATER(MSGPACK_PP_TUPLE_SIZE(tuple),1), \ 00032 MSGPACK_PP_TUPLE_REMOVE_EXEC, \ 00033 MSGPACK_PP_TUPLE_REMOVE_RETURN \ 00034 ) \ 00035 (tuple, i) \ 00036 /**/ 00037 # 00038 # define MSGPACK_PP_TUPLE_REMOVE_EXEC(tuple, i) \ 00039 MSGPACK_PP_ARRAY_TO_TUPLE(MSGPACK_PP_ARRAY_REMOVE(MSGPACK_PP_TUPLE_TO_ARRAY(tuple), i)) \ 00040 /**/ 00041 # 00042 # define MSGPACK_PP_TUPLE_REMOVE_RETURN(tuple, i) tuple 00043 # 00044 # /* MSGPACK_PP_TUPLE_REMOVE_D */ 00045 # 00046 # define MSGPACK_PP_TUPLE_REMOVE_D(d, tuple, i) \ 00047 MSGPACK_PP_IIF \ 00048 ( \ 00049 MSGPACK_PP_GREATER_D(d, MSGPACK_PP_TUPLE_SIZE(tuple), 1), \ 00050 MSGPACK_PP_TUPLE_REMOVE_D_EXEC, \ 00051 MSGPACK_PP_TUPLE_REMOVE_D_RETURN \ 00052 ) \ 00053 (d, tuple, i) \ 00054 /**/ 00055 # 00056 # define MSGPACK_PP_TUPLE_REMOVE_D_EXEC(d, tuple, i) \ 00057 MSGPACK_PP_ARRAY_TO_TUPLE(MSGPACK_PP_ARRAY_REMOVE_D(d, MSGPACK_PP_TUPLE_TO_ARRAY(tuple), i)) \ 00058 /**/ 00059 # 00060 # define MSGPACK_PP_TUPLE_REMOVE_D_RETURN(d, tuple, i) tuple 00061 # 00062 # endif // MSGPACK_PP_VARIADICS 00063 # 00064 # endif // MSGPACK_PREPROCESSOR_TUPLE_REMOVE_HPP
Generated on Tue Jul 12 2022 22:51:46 by 1.7.2