Ticket #1427: transform_iterator_test.patch
File transform_iterator_test.patch, 816 bytes (added by , 12 years ago) |
---|
-
transform_iterator_test.cpp
106 106 { 107 107 //Implement result_of protocol 108 108 template <class FArgs> struct result; 109 template <class F, class T> struct result<F(T)> {typedef T type;}; 109 template <class F, class T> struct result<F(T )> {typedef T type;}; 110 template <class F, class T> struct result<F(T& )> {typedef T type;}; 111 template <class F, class T> struct result<F(const T&)> {typedef T type;}; 110 112 111 113 template <class T> 112 typename result<polymorphic_mult_functor(T)>::type 113 operator()(const T& _arg) const {return _arg*2;} 114 T operator()(const T& _arg) const {return _arg*2;} 114 115 }; 115 116 116 117 int