This commit is contained in:
Damien Buhl (alias daminetreg)
2015-05-06 08:21:02 +02:00
parent 3b86f61f15
commit 8b1da45bfe
3 changed files with 21 additions and 11 deletions

View File

@ -17,6 +17,8 @@
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/variadic/to_seq.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
@ -61,25 +63,28 @@
(1)NAME_SEQ, \
struct_tag, \
0, \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \
BOOST_FUSION_ADAPT_STRUCT_C)
# define BOOST_FUSION_ADAPT_STRUCT(NAME, ...) \
# define BOOST_FUSION_ADAPT_STRUCT(...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
(0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
struct_tag, \
0, \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
BOOST_FUSION_ADAPT_STRUCT_C)
# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ...) \
# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
(0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
struct_tag, \
1, \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
BOOST_FUSION_ADAPT_STRUCT_C)
#else // BOOST_PP_VARIADICS