On Thu, 29 Apr 2010 21:22:25 +0200 Bart wrote:
BVA> template <typename T, typename U>
BVA> inline void erase_value(T& container, const U& value)
BVA> {
BVA> typename T::iterator next;
BVA> for (typename T::iterator p = container.begin(); p != container.end();
BVA> p = next)
BVA> {
BVA> next = p;
BVA> ++next;
BVA> if (*p == value)
BVA> next = container.erase(p);
BVA> }
BVA> }
This hackery with an extra variable and juggling it around is exactly what
I'm trying to avoid. What do you think of the idea I proposed in my response
to Magnus' message?
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders