Changed functionality so empty arrays/lists when converted to a seq or a tuple expand to nothing.

This commit is contained in:
Edward Diener
2014-05-05 20:49:20 -04:00
parent 181a88db7e
commit 1f16a481c7
6 changed files with 68 additions and 21 deletions

View File

@ -14,9 +14,20 @@
# define BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
#
# include <boost/preprocessor/array/data.hpp>
# include <boost/preprocessor/array/size.hpp>
# include <boost/preprocessor/control/if.hpp>
# include <boost/preprocessor/facilities/empty.hpp>
#
# /* BOOST_PP_ARRAY_TO_TUPLE */
#
# define BOOST_PP_ARRAY_TO_TUPLE BOOST_PP_ARRAY_DATA
# define BOOST_PP_ARRAY_TO_TUPLE(array) \
BOOST_PP_IF \
( \
BOOST_PP_ARRAY_SIZE(array), \
BOOST_PP_ARRAY_DATA, \
BOOST_PP_EMPTY \
) \
(array) \
/**/
#
# endif