]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/list/adt.hpp
update boost to pre-1.30.0
[lyx.git] / boost / boost / preprocessor / list / adt.hpp
1 # /* Copyright (C) 2001
2 #  * Housemarque Oy
3 #  * http://www.housemarque.com
4 #  *
5 #  * Permission to copy, use, modify, sell and distribute this software is
6 #  * granted provided this copyright notice appears in all copies. This
7 #  * software is provided "as is" without express or implied warranty, and
8 #  * with no claim as to its suitability for any purpose.
9 #  *
10 #  * See http://www.boost.org for most recent version.
11 #  */
12 #
13 # /* Revised by Paul Mensonides (2002) */
14 #
15 # ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP
16 # define BOOST_PREPROCESSOR_LIST_ADT_HPP
17 #
18 # include <boost/preprocessor/config/config.hpp>
19 # include <boost/preprocessor/detail/is_binary.hpp>
20 # include <boost/preprocessor/logical/compl.hpp>
21 # include <boost/preprocessor/tuple/eat.hpp>
22 #
23 # /* BOOST_PP_LIST_CONS */
24 #
25 # define BOOST_PP_LIST_CONS(head, tail) (head, tail)
26 #
27 # /* BOOST_PP_LIST_NIL */
28 #
29 # define BOOST_PP_LIST_NIL BOOST_PP_NIL
30 #
31 # /* BOOST_PP_LIST_FIRST */
32 #
33 # define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list)
34 #
35 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
36 #    define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list
37 # else
38 #    define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list
39 # endif
40 #
41 # define BOOST_PP_LIST_FIRST_I(head, tail) head
42 #
43 # /* BOOST_PP_LIST_REST */
44 #
45 # define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list)
46 #
47 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
48 #    define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list
49 # else
50 #    define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list
51 # endif
52 #
53 # define BOOST_PP_LIST_REST_I(head, tail) tail
54 #
55 # /* BOOST_PP_LIST_IS_CONS */
56 #
57 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()
58 #    define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list)
59 #    define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list
60 #    define BOOST_PP_LIST_IS_CONS_(head, tail) 1
61 #    define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0
62 # else
63 #    define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list)
64 # endif
65 #
66 # /* BOOST_PP_LIST_IS_NIL */
67 #
68 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()
69 #    define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list))
70 # else
71 #    define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list))
72 # endif
73 #
74 # endif