Ticket #4189: transform_iterator.patch
File transform_iterator.patch, 1009 bytes (added by , 12 years ago) |
---|
-
boost/iterator/transform_iterator.hpp
14 14 #include <boost/iterator/iterator_categories.hpp> 15 15 #include <boost/mpl/not.hpp> 16 16 #include <boost/mpl/bool.hpp> 17 #include <boost/optional.hpp> 17 18 #include <boost/type_traits/function_traits.hpp> 18 19 #include <boost/type_traits/is_const.hpp> 19 20 #include <boost/type_traits/is_class.hpp> … … 130 131 {} 131 132 132 133 UnaryFunc functor() const 133 { return m_f; }134 { return *m_f; } 134 135 135 136 private: 136 137 typename super_t::reference dereference() const 137 { return m_f(*this->base()); }138 { return (*m_f)(*this->base()); } 138 139 139 140 // Probably should be the initial base class so it can be 140 141 // optimized away via EBO if it is an empty class. 141 UnaryFuncm_f;142 boost::optional<UnaryFunc> m_f; 142 143 }; 143 144 144 145 template <class UnaryFunc, class Iterator>