27 May
2009
27 May
'09
2:54 p.m.
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.