forked from boostorg/fusion
Added new ADAPT_STRUCT API support for the ADAPT_STRUCT_AS_VIEW macro.
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <boost/fusion/adapted/struct/detail/extension.hpp>
|
#include <boost/fusion/adapted/struct/detail/extension.hpp>
|
||||||
#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
|
#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
|
||||||
|
#include <boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp>
|
||||||
#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
|
#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
|
||||||
#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
|
#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
|
||||||
#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
|
#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
|
||||||
@ -66,6 +67,15 @@
|
|||||||
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
|
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
|
||||||
BOOST_FUSION_ADAPT_STRUCT_C)
|
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||||
|
|
||||||
|
# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ...) \
|
||||||
|
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||||
|
(0), \
|
||||||
|
(0)(NAME), \
|
||||||
|
struct_tag, \
|
||||||
|
1, \
|
||||||
|
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
|
||||||
|
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||||
|
|
||||||
#else // BOOST_PP_VARIADICS
|
#else // BOOST_PP_VARIADICS
|
||||||
|
|
||||||
# define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \
|
# define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \
|
||||||
@ -79,15 +89,18 @@
|
|||||||
_END), \
|
_END), \
|
||||||
BOOST_FUSION_ADAPT_STRUCT_C)
|
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||||
|
|
||||||
#endif // BOOST_PP_VARIADICS
|
# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||||
|
|
||||||
#define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
|
|
||||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||||
(0), \
|
(0), \
|
||||||
(0)(NAME), \
|
(0)(NAME), \
|
||||||
struct_tag, \
|
struct_tag, \
|
||||||
1, \
|
1, \
|
||||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
|
BOOST_PP_CAT( \
|
||||||
|
BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
|
||||||
|
_END), \
|
||||||
BOOST_FUSION_ADAPT_STRUCT_C)
|
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||||
|
|
||||||
|
|
||||||
|
#endif // BOOST_PP_VARIADICS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/fusion/support/tag_of_fwd.hpp>
|
#include <boost/fusion/support/tag_of_fwd.hpp>
|
||||||
#include <boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp>
|
|
||||||
|
|
||||||
#include <boost/preprocessor/empty.hpp>
|
#include <boost/preprocessor/empty.hpp>
|
||||||
#include <boost/preprocessor/stringize.hpp>
|
#include <boost/preprocessor/stringize.hpp>
|
||||||
|
Reference in New Issue
Block a user