Fixes for empty tuple processing

This commit is contained in:
Edward Diener
2014-04-27 12:00:13 -04:00
parent 21ccb35814
commit f80bb83f3b
5 changed files with 87 additions and 6 deletions

View File

@ -1,6 +1,7 @@
# /* **************************************************************************
# * *
# * (C) Copyright Edward Diener 2011.
# * (C) Copyright Paul Mensonides 2011.
# * (C) Copyright Edward Diener 2011,2014.
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
@ -19,6 +20,7 @@
# include <boost/preprocessor/list/adt.hpp>
# include <boost/preprocessor/tuple/elem.hpp>
# include <boost/preprocessor/tuple/rem.hpp>
# include <boost/preprocessor/array/detail/get_data.hpp>
#
# /* BOOST_PP_LIST_TO_ARRAY */
#
@ -114,7 +116,7 @@
# endif
# define BOOST_PP_LIST_TO_ARRAY_P(d, state) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(3, 0, state))
# define BOOST_PP_LIST_TO_ARRAY_O(d, state) BOOST_PP_LIST_TO_ARRAY_O_I state
# define BOOST_PP_LIST_TO_ARRAY_O_I(list, size, tuple) (BOOST_PP_LIST_REST(list), BOOST_PP_INC(size), (BOOST_PP_TUPLE_REM(size) tuple, BOOST_PP_LIST_FIRST(list)))
# define BOOST_PP_LIST_TO_ARRAY_O_I(list, size, tuple) (BOOST_PP_LIST_REST(list), BOOST_PP_INC(size), (BOOST_PP_ARRAY_DETAIL_GET_DATA(size,tuple), BOOST_PP_LIST_FIRST(list)))
#
# /* BOOST_PP_LIST_TO_ARRAY_D */
#