Revert [68076], refs #1427.

Will try to fix this properly in 1.47.


[SVN r68524]
This commit is contained in:
Daniel James
2011-01-28 08:40:25 +00:00
parent 5a88e6f958
commit d45b57c33c
2 changed files with 20 additions and 37 deletions

View File

@ -102,16 +102,6 @@ int mult_2(int arg)
return arg*2;
}
struct polymorphic_mult_functor
{
//Implement result_of protocol
template <class FArgs> struct result;
template <class F, class T> struct result<F(T)> {typedef T type;};
template <class T>
typename result<polymorphic_mult_functor(T)>::type
operator()(const T& _arg) const {return _arg*2;}
};
int
main()
@ -254,25 +244,5 @@ main()
);
}
// Test transform_iterator with polymorphic object function
{
int x[N], y[N];
for (int k = 0; k < N; ++k)
x[k] = k;
std::copy(x, x + N, y);
for (int k2 = 0; k2 < N; ++k2)
x[k2] = x[k2] * 2;
boost::input_iterator_test(
boost::make_transform_iterator(y, polymorphic_mult_functor()), x[0], x[1]);
boost::input_iterator_test(
boost::make_transform_iterator(&y[0], polymorphic_mult_functor()), x[0], x[1]);
boost::random_access_readable_iterator_test(
boost::make_transform_iterator(y, polymorphic_mult_functor()), N, x);
}
return boost::report_errors();
}