1 | --- D:/users/debionne/dev/boost/boost_1_39_0/libs/iterator/test/transform_iterator_test.cpp Fri Jul 31 10:46:13 2009
|
---|
2 | +++ D:/users/debionne/dev/boost/clean/boost_1_39_0/libs/iterator/test/transform_iterator_test.cpp Sun Feb 25 17:28:02 2007
|
---|
3 | @@ -102,16 +102,6 @@
|
---|
4 | return arg*2;
|
---|
5 | }
|
---|
6 |
|
---|
7 | -struct polymorphic_mult_functor
|
---|
8 | -{
|
---|
9 | - //Implement result_of protocol
|
---|
10 | - template <class FArgs> struct result;
|
---|
11 | - template <class F, class T> struct result<F(T)> {typedef T type;};
|
---|
12 | -
|
---|
13 | - template <class T>
|
---|
14 | - typename result<polymorphic_mult_functor(T)>::type
|
---|
15 | - operator()(const T& _arg) const {return _arg*2;}
|
---|
16 | -};
|
---|
17 |
|
---|
18 | int
|
---|
19 | main()
|
---|
20 | @@ -252,26 +242,6 @@
|
---|
21 | ++boost::make_transform_iterator((pair_t*)values, select_first())
|
---|
22 | , boost::make_transform_iterator((pair_t*)values, const_select_first())
|
---|
23 | );
|
---|
24 | - }
|
---|
25 | -
|
---|
26 | - // Test transform_iterator with polymorphic object function
|
---|
27 | - {
|
---|
28 | - int x[N], y[N];
|
---|
29 | - for (int k = 0; k < N; ++k)
|
---|
30 | - x[k] = k;
|
---|
31 | - std::copy(x, x + N, y);
|
---|
32 | -
|
---|
33 | - for (int k2 = 0; k2 < N; ++k2)
|
---|
34 | - x[k2] = x[k2] * 2;
|
---|
35 | -
|
---|
36 | - boost::input_iterator_test(
|
---|
37 | - boost::make_transform_iterator(y, polymorphic_mult_functor()), x[0], x[1]);
|
---|
38 | -
|
---|
39 | - boost::input_iterator_test(
|
---|
40 | - boost::make_transform_iterator(&y[0], polymorphic_mult_functor()), x[0], x[1]);
|
---|
41 | -
|
---|
42 | - boost::random_access_readable_iterator_test(
|
---|
43 | - boost::make_transform_iterator(y, polymorphic_mult_functor()), N, x);
|
---|
44 | }
|
---|
45 |
|
---|
46 | return boost::report_errors();
|
---|