|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68205 - in trunk: boost/iterator libs/iterator/test
From: marshall_at_[hidden]
Date: 2011-01-17 09:52:50
Author: marshall
Date: 2011-01-17 09:52:49 EST (Mon, 17 Jan 2011)
New Revision: 68205
URL: http://svn.boost.org/trac/boost/changeset/68205
Log:
Added Michel's patches for #1427
Text files modified:
trunk/boost/iterator/transform_iterator.hpp | 4 +---
trunk/libs/iterator/test/transform_iterator_test.cpp | 7 ++++---
2 files changed, 5 insertions(+), 6 deletions(-)
Modified: trunk/boost/iterator/transform_iterator.hpp
==============================================================================
--- trunk/boost/iterator/transform_iterator.hpp (original)
+++ trunk/boost/iterator/transform_iterator.hpp 2011-01-17 09:52:49 EST (Mon, 17 Jan 2011)
@@ -42,13 +42,11 @@
struct transform_iterator_base
{
private:
- typedef typename std::iterator_traits<Iterator>::reference Arg1;
-
// By default, dereferencing the iterator yields the same as
// the function.
typedef typename ia_dflt_help<
Reference
- , result_of<UnaryFunc(typename std::iterator_traits<Iterator>::value_type)>
+ , result_of<UnaryFunc(typename std::iterator_traits<Iterator>::reference)>
>::type reference;
// To get the default for Value: remove any reference on the
Modified: trunk/libs/iterator/test/transform_iterator_test.cpp
==============================================================================
--- trunk/libs/iterator/test/transform_iterator_test.cpp (original)
+++ trunk/libs/iterator/test/transform_iterator_test.cpp 2011-01-17 09:52:49 EST (Mon, 17 Jan 2011)
@@ -106,11 +106,12 @@
{
//Implement result_of protocol
template <class FArgs> struct result;
- template <class F, class T> struct result<F(T)> {typedef T type;};
+ template <class F, class T> struct result<F(T )> {typedef T type;};
+ template <class F, class T> struct result<F(T& )> {typedef T type;};
+ template <class F, class T> struct result<F(const T&)> {typedef T type;};
template <class T>
- typename result<polymorphic_mult_functor(T)>::type
- operator()(const T& _arg) const {return _arg*2;}
+ T operator()(const T& _arg) const {return _arg*2;}
};
int
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk