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_ENUM_HPP) 8 #define BOOST_VMD_DETAIL_SEQUENCE_ENUM_HPP 9 10 #include <boost/preprocessor/control/iif.hpp> 11 #include <boost/preprocessor/tuple/enum.hpp> 12 #include <boost/vmd/empty.hpp> 13 #include <boost/vmd/is_empty.hpp> 14 #include <boost/vmd/detail/sequence_to_tuple.hpp> 15 16 #define BOOST_VMD_DETAIL_SEQUENCE_ENUM_PROCESS(tuple) \ 17 BOOST_PP_IIF \ 18 ( \ 19 BOOST_VMD_IS_EMPTY(tuple), \ 20 BOOST_VMD_EMPTY, \ 21 BOOST_PP_TUPLE_ENUM \ 22 ) \ 23 (tuple) \ 24 /**/ 25 26 #define BOOST_VMD_DETAIL_SEQUENCE_ENUM(...) \ 27 BOOST_VMD_DETAIL_SEQUENCE_ENUM_PROCESS \ 28 ( \ 29 BOOST_VMD_DETAIL_SEQUENCE_TO_TUPLE(__VA_ARGS__) \ 30 ) \ 31 /**/ 32 33 #define BOOST_VMD_DETAIL_SEQUENCE_ENUM_D(d,...) \ 34 BOOST_VMD_DETAIL_SEQUENCE_ENUM_PROCESS \ 35 ( \ 36 BOOST_VMD_DETAIL_SEQUENCE_TO_TUPLE_D(d,__VA_ARGS__) \ 37 ) \ 38 /**/ 39 40 #endif /* BOOST_VMD_DETAIL_SEQUENCE_ENUM_HPP */ 41