From caa0e5035ae4e89fe4e26ad9f287e8ac3848382e Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 17 Jan 2011 14:52:49 +0000 Subject: [PATCH] Added Michel's patches for #1427 [SVN r68205] --- include/boost/iterator/transform_iterator.hpp | 4 +--- test/transform_iterator_test.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/boost/iterator/transform_iterator.hpp b/include/boost/iterator/transform_iterator.hpp index 1a229e2..86565b8 100644 --- a/include/boost/iterator/transform_iterator.hpp +++ b/include/boost/iterator/transform_iterator.hpp @@ -42,13 +42,11 @@ namespace boost struct transform_iterator_base { private: - typedef typename std::iterator_traits::reference Arg1; - // By default, dereferencing the iterator yields the same as // the function. typedef typename ia_dflt_help< Reference - , result_of::value_type)> + , result_of::reference)> >::type reference; // To get the default for Value: remove any reference on the diff --git a/test/transform_iterator_test.cpp b/test/transform_iterator_test.cpp index e72fc79..255eab4 100644 --- a/test/transform_iterator_test.cpp +++ b/test/transform_iterator_test.cpp @@ -106,11 +106,12 @@ struct polymorphic_mult_functor { //Implement result_of protocol template struct result; - template struct result {typedef T type;}; + template struct result {typedef T type;}; + template struct result {typedef T type;}; + template struct result {typedef T type;}; template - typename result::type - operator()(const T& _arg) const {return _arg*2;} + T operator()(const T& _arg) const {return _arg*2;} }; int