Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | # /* 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 | # * See http://www.boost.org for most recent version. |
| 10 | # */ |
| 11 | # |
| 12 | # /* Revised by Paul Mensonides (2002) */ |
| 13 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 14 | # ifndef NDNBOOST_PREPROCESSOR_LIST_ADT_HPP |
| 15 | # define NDNBOOST_PREPROCESSOR_LIST_ADT_HPP |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 16 | # |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 17 | # include <ndnboost/preprocessor/config/config.hpp> |
| 18 | # include <ndnboost/preprocessor/detail/is_binary.hpp> |
| 19 | # include <ndnboost/preprocessor/logical/compl.hpp> |
| 20 | # include <ndnboost/preprocessor/tuple/eat.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 21 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 22 | # /* NDNBOOST_PP_LIST_CONS */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 23 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 24 | # define NDNBOOST_PP_LIST_CONS(head, tail) (head, tail) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 25 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 26 | # /* NDNBOOST_PP_LIST_NIL */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 27 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 28 | # define NDNBOOST_PP_LIST_NIL NDNBOOST_PP_NIL |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 29 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 30 | # /* NDNBOOST_PP_LIST_FIRST */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 31 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 32 | # define NDNBOOST_PP_LIST_FIRST(list) NDNBOOST_PP_LIST_FIRST_D(list) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 33 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 34 | # if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_MWCC() |
| 35 | # define NDNBOOST_PP_LIST_FIRST_D(list) NDNBOOST_PP_LIST_FIRST_I list |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 36 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 37 | # define NDNBOOST_PP_LIST_FIRST_D(list) NDNBOOST_PP_LIST_FIRST_I ## list |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 38 | # endif |
| 39 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 40 | # define NDNBOOST_PP_LIST_FIRST_I(head, tail) head |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 41 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 42 | # /* NDNBOOST_PP_LIST_REST */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 43 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 44 | # define NDNBOOST_PP_LIST_REST(list) NDNBOOST_PP_LIST_REST_D(list) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 45 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 46 | # if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_MWCC() |
| 47 | # define NDNBOOST_PP_LIST_REST_D(list) NDNBOOST_PP_LIST_REST_I list |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 48 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 49 | # define NDNBOOST_PP_LIST_REST_D(list) NDNBOOST_PP_LIST_REST_I ## list |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 50 | # endif |
| 51 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 52 | # define NDNBOOST_PP_LIST_REST_I(head, tail) tail |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 53 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 54 | # /* NDNBOOST_PP_LIST_IS_CONS */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 55 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 56 | # if NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_BCC() |
| 57 | # define NDNBOOST_PP_LIST_IS_CONS(list) NDNBOOST_PP_LIST_IS_CONS_D(list) |
| 58 | # define NDNBOOST_PP_LIST_IS_CONS_D(list) NDNBOOST_PP_LIST_IS_CONS_ ## list |
| 59 | # define NDNBOOST_PP_LIST_IS_CONS_(head, tail) 1 |
| 60 | # define NDNBOOST_PP_LIST_IS_CONS_NDNBOOST_PP_NIL 0 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 61 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 62 | # define NDNBOOST_PP_LIST_IS_CONS(list) NDNBOOST_PP_IS_BINARY(list) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 63 | # endif |
| 64 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 65 | # /* NDNBOOST_PP_LIST_IS_NIL */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 66 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 67 | # if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_BCC() |
| 68 | # define NDNBOOST_PP_LIST_IS_NIL(list) NDNBOOST_PP_COMPL(NDNBOOST_PP_IS_BINARY(list)) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 69 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 70 | # define NDNBOOST_PP_LIST_IS_NIL(list) NDNBOOST_PP_COMPL(NDNBOOST_PP_LIST_IS_CONS(list)) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 71 | # endif |
| 72 | # |
| 73 | # endif |