mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-15 13:26:40 +02:00
Remove BOOST_PP_IS_EMPTY in favor of BOOST_MPL_PP_TOKEN_EQUAL and added auto as synonym for BOOST_FUSION_ADAPT_AUTO.
Fix ticket https://svn.boost.org/trac/boost/ticket/11157 BOOST_MPL_PP_TOKEN_EQUAL is now used to check if auto/BOOST_FUSION_ADAPT_AUTO was provided as type, telling to deduce members types.
This commit is contained in:
committed by
Kohei Takahashi
parent
1774972237
commit
2e466ac054
@ -104,7 +104,7 @@ namespace ns
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
ns::bar,
|
||||
foo_.x, // test that adapted members can actually be expressions
|
||||
y
|
||||
(auto , y)
|
||||
)
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
@ -120,7 +120,7 @@ namespace ns
|
||||
ns::point,
|
||||
(int, x)
|
||||
(int, y)
|
||||
(BOOST_FUSION_ADAPT_AUTO, z)
|
||||
(auto, z)
|
||||
)
|
||||
|
||||
# if !BOOST_WORKAROUND(__GNUC__,<4)
|
||||
@ -128,17 +128,18 @@ namespace ns
|
||||
ns::point_with_private_attributes,
|
||||
(int, x)
|
||||
(int, y)
|
||||
(BOOST_FUSION_ADAPT_AUTO, z)
|
||||
(auto, z)
|
||||
)
|
||||
# endif
|
||||
|
||||
struct s { int m; };
|
||||
BOOST_FUSION_ADAPT_STRUCT(s, (BOOST_FUSION_ADAPT_AUTO, m))
|
||||
BOOST_FUSION_ADAPT_STRUCT(s, (auto, m))
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
ns::bar,
|
||||
(BOOST_FUSION_ADAPT_AUTO, foo_.x) // test that adapted members can actually be expressions
|
||||
(BOOST_FUSION_ADAPT_AUTO, y)
|
||||
(auto, foo_.x) // test that adapted members can actually be expressions
|
||||
(BOOST_FUSION_ADAPT_AUTO, y) // Mixing auto & BOOST_FUSION_ADAPT_AUTO
|
||||
// to test backward compatibility
|
||||
)
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
|
Reference in New Issue
Block a user