00001 #
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #
00012 #
00013 #
00014 # ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP
00015 # define BOOST_PREPROCESSOR_LIST_ADT_HPP
00016 #
00017 # include <boost/preprocessor/config/config.hpp>
00018 # include <boost/preprocessor/detail/is_binary.hpp>
00019 # include <boost/preprocessor/logical/compl.hpp>
00020 # include <boost/preprocessor/tuple/eat.hpp>
00021 #
00022 #
00023 #
00024 # define BOOST_PP_LIST_CONS(head, tail) (head, tail)
00025 #
00026 #
00027 #
00028 # define BOOST_PP_LIST_NIL BOOST_PP_NIL
00029 #
00030 #
00031 #
00032 # define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list)
00033 #
00034 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
00035 # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list
00036 # else
00037 # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list
00038 # endif
00039 #
00040 # define BOOST_PP_LIST_FIRST_I(head, tail) head
00041 #
00042 #
00043 #
00044 # define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list)
00045 #
00046 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
00047 # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list
00048 # else
00049 # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list
00050 # endif
00051 #
00052 # define BOOST_PP_LIST_REST_I(head, tail) tail
00053 #
00054 #
00055 #
00056 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()
00057 # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list)
00058 # define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list
00059 # define BOOST_PP_LIST_IS_CONS_(head, tail) 1
00060 # define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0
00061 # else
00062 # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list)
00063 # endif
00064 #
00065 #
00066 #
00067 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()
00068 # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list))
00069 # else
00070 # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list))
00071 # endif
00072 #
00073 # endif