Boost Users :
Subject: Re: [Boost-users] transform_iterator causing strange problems
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-05-27 09:40:51
Lindley M French wrote:
> Okay, that makes sense as a cause, anyway. I'm not clear on how to fix it. Does this mean that transform_iterator can't be used to convert a map iterator into a value or key iterator? I've done that before and it seemed to work, but that may have been a std::map rather than a boost::unordered_map.....or perhaps it was the fact that I was returning by value before.
> If I have to return by value for this to be feasible, it's not worth it. I'll just go with the slightly messier interface.
If you change the signature of operator() to take exactly the
type that it is given, then there will be no implicit conversion
and the behavior will be what you expect.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net