Merge remote-tracking branch 'official/develop' into fusion_adapters

Conflicts:
	test/sequence/adapt_struct.cpp
This commit is contained in:
Damien Buhl (alias daminetreg)
2015-02-02 07:06:52 +01:00
239 changed files with 8117 additions and 7205 deletions

View File

@ -56,6 +56,17 @@ namespace ns
{}
};
#endif
struct foo
{
int x;
};
struct bar
{
foo foo_;
int y;
};
}
#if BOOST_PP_VARIADICS
@ -79,6 +90,12 @@ namespace ns
struct s { int m; };
BOOST_FUSION_ADAPT_STRUCT(s, m)
BOOST_FUSION_ADAPT_STRUCT(
ns::bar,
foo_.x, // test that adapted members can actually be expressions
y
)
#else // BOOST_PP_VARIADICS
BOOST_FUSION_ADAPT_STRUCT(
@ -100,6 +117,12 @@ namespace ns
struct s { int m; };
BOOST_FUSION_ADAPT_STRUCT(s, (BOOST_FUSION_ADAPT_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)
)
#endif
int
@ -192,6 +215,15 @@ main()
}
#endif
{
fusion::vector<int, float> v1(4, 2);
ns::bar v2 = {5, 3};
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);
BOOST_TEST(v2 >= v1);
}
return boost::report_errors();
}