blob: 14f018a248a9bc8be49c1c1b783a3c3582eed819 [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001# /* Copyright (C) 2001
2# * Housemarque Oy
3# * http://www.housemarque.com
4# *
5# * Distributed under the Boost Software License, Version 1.0. (See
6# * accompanying file LICENSE_1_0.txt or copy at
7# * http://www.boost.org/LICENSE_1_0.txt)
8# */
9#
10# /* Revised by Paul Mensonides (2002) */
11#
12# /* See http://www.boost.org for most recent version. */
13#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070014# ifndef NDNBOOST_PREPROCESSOR_LIST_APPEND_HPP
15# define NDNBOOST_PREPROCESSOR_LIST_APPEND_HPP
Jeff Thompsonf7d49942013-08-01 16:47:40 -070016#
Jeff Thompson2277ce52013-08-01 17:34:11 -070017# include <ndnboost/preprocessor/config/config.hpp>
18# include <ndnboost/preprocessor/list/fold_right.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070019#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070020# /* NDNBOOST_PP_LIST_APPEND */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070021#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070022# if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_EDG()
23# define NDNBOOST_PP_LIST_APPEND(a, b) NDNBOOST_PP_LIST_FOLD_RIGHT(NDNBOOST_PP_LIST_APPEND_O, b, a)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070024# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070025# define NDNBOOST_PP_LIST_APPEND(a, b) NDNBOOST_PP_LIST_APPEND_I(a, b)
26# define NDNBOOST_PP_LIST_APPEND_I(a, b) NDNBOOST_PP_LIST_FOLD_RIGHT(NDNBOOST_PP_LIST_APPEND_O, b, a)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070027# endif
28#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# define NDNBOOST_PP_LIST_APPEND_O(d, s, x) (x, s)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070030#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031# /* NDNBOOST_PP_LIST_APPEND_D */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070032#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070033# if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_EDG()
34# define NDNBOOST_PP_LIST_APPEND_D(d, a, b) NDNBOOST_PP_LIST_FOLD_RIGHT_ ## d(NDNBOOST_PP_LIST_APPEND_O, b, a)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070035# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070036# define NDNBOOST_PP_LIST_APPEND_D(d, a, b) NDNBOOST_PP_LIST_APPEND_D_I(d, a, b)
37# define NDNBOOST_PP_LIST_APPEND_D_I(d, a, b) NDNBOOST_PP_LIST_FOLD_RIGHT_ ## d(NDNBOOST_PP_LIST_APPEND_O, b, a)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070038# endif
39#
40# endif