forked from boostorg/fusion
testing fusion transform and fold work with free functions now that only Boost.ResultOf support is required
[SVN r38063]
This commit is contained in:
@ -115,6 +115,11 @@ struct lvalue_adder
|
||||
}
|
||||
};
|
||||
|
||||
int add(int lhs, int rhs)
|
||||
{
|
||||
return lhs + rhs;
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
@ -164,6 +169,11 @@ main()
|
||||
BOOST_TEST(fusion::fold(vec, 0, lvalue_adder()) == 3);
|
||||
}
|
||||
|
||||
{
|
||||
vector<int, int> vec(1,2);
|
||||
BOOST_TEST(fusion::fold(vec, 0, add) == 3);
|
||||
}
|
||||
|
||||
{
|
||||
typedef vector<int, char, int, double> vector_type;
|
||||
vector_type v(12345, 'x', 678910, 3.36);
|
||||
@ -202,6 +212,11 @@ main()
|
||||
== "abcde");
|
||||
}
|
||||
|
||||
{
|
||||
vector<int, int> vec(1,2);
|
||||
BOOST_TEST(fusion::accumulate(vec, 0, add) == 3);
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user