Index: boost/iterator/transform_iterator.hpp =================================================================== --- boost/iterator/transform_iterator.hpp (revision 61317) +++ boost/iterator/transform_iterator.hpp (working copy) @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -130,15 +131,15 @@ {} UnaryFunc functor() const - { return m_f; } + { return *m_f; } private: typename super_t::reference dereference() const - { return m_f(*this->base()); } + { return (*m_f)(*this->base()); } // Probably should be the initial base class so it can be // optimized away via EBO if it is an empty class. - UnaryFunc m_f; + boost::optional m_f; }; template