
6 Jan
2011
6 Jan
'11
3:48 p.m.
Hi, Boost 1.42.0 documentation of transfrom_iterator says: "If Reference is use_default then the reference member of transform_iterator is result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type. Otherwise, reference is Reference." But it is simply implemented as UnaryFunction::result_type; This discrepancy between documentation and implementation plays a role when I want to use transform_iterator with boost::mem_fn to access member variable of structure. mem_fn's operator() is overridden to provide both const and non-const access to member variable. The discrepancy leads to compilation error for non-const access.