1 # /* **************************************************************************
3 # * (C) Copyright Edward Diener 2011. *
4 # * (C) Copyright Paul Mensonides 2011. *
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) *
9 # ************************************************************************** */
11 # /* See http://www.boost.org for most recent version. */
13 # ifndef BOOST_PREPROCESSOR_ARRAY_TO_SEQ_HPP
14 # define BOOST_PREPROCESSOR_ARRAY_TO_SEQ_HPP
16 # include <boost/preprocessor/cat.hpp>
17 # include <boost/preprocessor/config/config.hpp>
18 # include <boost/preprocessor/array/size.hpp>
19 # include <boost/preprocessor/control/if.hpp>
20 # include <boost/preprocessor/tuple/to_seq.hpp>
22 # /* BOOST_PP_ARRAY_TO_SEQ */
24 # define BOOST_PP_ARRAY_TO_SEQ(array) \
27 BOOST_PP_ARRAY_SIZE(array), \
28 BOOST_PP_ARRAY_TO_SEQ_DO, \
29 BOOST_PP_ARRAY_TO_SEQ_EMPTY \
33 # define BOOST_PP_ARRAY_TO_SEQ_EMPTY(array)
35 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
36 # define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_ARRAY_TO_SEQ_I(BOOST_PP_TUPLE_TO_SEQ, array)
37 # define BOOST_PP_ARRAY_TO_SEQ_I(m, args) BOOST_PP_ARRAY_TO_SEQ_II(m, args)
38 # define BOOST_PP_ARRAY_TO_SEQ_II(m, args) BOOST_PP_CAT(m ## args,)
39 # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
40 # define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_ARRAY_TO_SEQ_I(array)
41 # define BOOST_PP_ARRAY_TO_SEQ_I(array) BOOST_PP_TUPLE_TO_SEQ ## array
43 # define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_TUPLE_TO_SEQ array