|
Boost Users : |
Subject: Re: [Boost-users] transform_iterator causing strange problems
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-05-27 10:54:58
Lindley M French wrote:
> Okay, that makes sense as a cause, anyway. I'm not clear on how to fix it.
Well, given the cause is temporaries due to implicit conversions, just
don't make those implicit conversions.
just change
const Group& operator()(const std::pair<GroupID, Group> &p) const
to
const Group& operator()(const std::pair<const GroupID, Group> &p) const
Alternatively, you could write
const Group& operator()(std::pair<const GroupID, Group> &p) const
which allows you to make sure p is not a temporary.
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