mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-16 05:42:20 +02:00
Adds the possibility to omit the member type in ADAPT_ASSOC* macros usage.
This feature is enabled when BOOST_PP_VARIADICS also is, as it rely on it. A placeholder for the type can be used when BOOST_PP_VARIADICS isn't active.
This commit is contained in:
@ -50,11 +50,21 @@ namespace ns
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT(
|
||||
ns::point,
|
||||
(int, x, ns::x_member)
|
||||
(int, y, ns::y_member)
|
||||
)
|
||||
#if BOOST_PP_VARIADICS
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT(
|
||||
ns::point,
|
||||
(x, ns::x_member)
|
||||
(int, y, ns::y_member)
|
||||
)
|
||||
|
||||
#else // BOOST_PP_VARIADICS
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT(
|
||||
ns::point,
|
||||
(BOOST_FUSION_ADAPT_AUTO, x, ns::x_member)
|
||||
(int, y, ns::y_member)
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
main()
|
||||
|
Reference in New Issue
Block a user