
OvermindDL1 wrote:
Instead of making a new function name, why not a function overload:
iterator erase(iterator it); // original void erase(iterator it, no_return); // no_return is an empty global created struct so you can just call m.erase(it, no_return);
Is "m.erase(it, no_return)" better than "m.erase_no_return(it)"? Is there a precedent (in C++, not Boost) for this, other than the (IMO confusing) pre- vs. post-increment operator declarations? I'm also concerned that people who bind C++ with dynamic languages may end up writing wrappers to make it a unary function again. This is a special case of the fact that a binary function may be a little more difficult to integrate into code which uses pointers to member functions. I'm open to other opinions, but offhand I prefer a unary function. John Zwinck