1 2 // (C) Copyright Edward Diener 2011-2015 3 // Use, modification and distribution are subject to the Boost Software License, 4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt). 6 7 #if !defined(BOOST_VMD_DETAIL_SEQUENCE_TO_ARRAY_HPP) 8 #define BOOST_VMD_DETAIL_SEQUENCE_TO_ARRAY_HPP 9 10 #include <boost/preprocessor/control/iif.hpp> 11 #include <boost/vmd/detail/modifiers.hpp> 12 #include <boost/vmd/detail/mods.hpp> 13 #include <boost/vmd/detail/not_empty.hpp> 14 #include <boost/vmd/detail/sequence_elem.hpp> 15 16 #define BOOST_VMD_DETAIL_SEQUENCE_TO_ARRAY(...) \ 17 BOOST_PP_IIF \ 18 ( \ 19 BOOST_VMD_DETAIL_NOT_EMPTY(BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__)), \ 20 BOOST_VMD_DETAIL_SEQUENCE_ELEM_PROCESS_TUPLE \ 21 ( \ 22 BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__), \ 23 , \ 24 BOOST_VMD_TYPE_ARRAY, \ 25 BOOST_VMD_DETAIL_NEW_MODS(BOOST_VMD_ALLOW_RETURN,__VA_ARGS__) \ 26 ), \ 27 (0,()) \ 28 ) \ 29 /**/ 30 31 #define BOOST_VMD_DETAIL_SEQUENCE_TO_ARRAY_D(d,...) \ 32 BOOST_PP_IIF \ 33 ( \ 34 BOOST_VMD_DETAIL_NOT_EMPTY(BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__)), \ 35 BOOST_VMD_DETAIL_SEQUENCE_ELEM_PROCESS_TUPLE_D \ 36 ( \ 37 d, \ 38 BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__), \ 39 , \ 40 BOOST_VMD_TYPE_ARRAY, \ 41 BOOST_VMD_DETAIL_NEW_MODS_D(d,BOOST_VMD_ALLOW_RETURN,__VA_ARGS__) \ 42 ), \ 43 (0,()) \ 44 ) \ 45 /**/ 46 47 #endif /* BOOST_VMD_DETAIL_SEQUENCE_TO_ARRAY_HPP */ 48