MessagePack for C++
pop_back.hpp
Go to the documentation of this file.
1 # /* **************************************************************************
2 # * *
3 # * (C) Copyright Edward Diener 2013.
4 # * Distributed under the Boost Software License, Version 1.0. (See
5 # * accompanying file LICENSE_1_0.txt or copy at
6 # * http://www.boost.org/LICENSE_1_0.txt)
7 # * *
8 # ************************************************************************** */
9 #
10 # /* See http://www.boost.org for most recent version. */
11 #
12 # ifndef MSGPACK_PREPROCESSOR_TUPLE_POP_BACK_HPP
13 # define MSGPACK_PREPROCESSOR_TUPLE_POP_BACK_HPP
14 #
16 #
17 # if MSGPACK_PP_VARIADICS
18 #
25 #
26 # /* MSGPACK_PP_TUPLE_POP_BACK */
27 #
28 # define MSGPACK_PP_TUPLE_POP_BACK(tuple) \
29  MSGPACK_PP_IIF \
30  ( \
31  MSGPACK_PP_GREATER(MSGPACK_PP_TUPLE_SIZE(tuple),1), \
32  MSGPACK_PP_TUPLE_POP_BACK_EXEC, \
33  MSGPACK_PP_TUPLE_POP_BACK_RETURN \
34  ) \
35  (tuple) \
36 
37 #
38 # define MSGPACK_PP_TUPLE_POP_BACK_EXEC(tuple) \
39  MSGPACK_PP_ARRAY_TO_TUPLE(MSGPACK_PP_ARRAY_POP_BACK(MSGPACK_PP_TUPLE_TO_ARRAY(tuple))) \
40 
41 #
42 # define MSGPACK_PP_TUPLE_POP_BACK_RETURN(tuple) tuple
43 #
44 # /* MSGPACK_PP_TUPLE_POP_BACK_Z */
45 #
46 # define MSGPACK_PP_TUPLE_POP_BACK_Z(z, tuple) \
47  MSGPACK_PP_IIF \
48  ( \
49  MSGPACK_PP_GREATER(MSGPACK_PP_TUPLE_SIZE(tuple),1), \
50  MSGPACK_PP_TUPLE_POP_BACK_Z_EXEC, \
51  MSGPACK_PP_TUPLE_POP_BACK_Z_RETURN \
52  ) \
53  (z, tuple) \
54 
55 #
56 # define MSGPACK_PP_TUPLE_POP_BACK_Z_EXEC(z, tuple) \
57  MSGPACK_PP_ARRAY_TO_TUPLE(MSGPACK_PP_ARRAY_POP_BACK_Z(z, MSGPACK_PP_TUPLE_TO_ARRAY(tuple))) \
58 
59 #
60 # define MSGPACK_PP_TUPLE_POP_BACK_Z_RETURN(z, tuple) tuple
61 #
62 # endif // MSGPACK_PP_VARIADICS
63 #
64 # endif // MSGPACK_PREPROCESSOR_TUPLE_POP_BACK_HPP