bugfix to fold test, and new transform test

[SVN r49470]
This commit is contained in:
Dan Marsden
2008-10-27 22:13:20 +00:00
parent d3f057e88c
commit e2d23b8a63
3 changed files with 69 additions and 2 deletions

View File

@ -15,8 +15,17 @@ namespace
{
template<int n, int batch>
struct distinct
{};
struct f
{
static const int value = n;
typedef int result_type;
template<int n, int batch>
int operator()(distinct<n, batch> const& d, int state) const
{
return state + n;
}
};
template<int batch>
@ -25,6 +34,8 @@ namespace
fusion::vector<
distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>,
distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v;
fusion::fold(v, 0, f());
}
}