
14 Mar
2005
14 Mar
'05
5:55 p.m.
Douglas Gregor <doug.gregor@gmail.com> writes:
On Feb 11, 2005, at 5:39 PM, Lloyd J Lewins wrote:
I notice that mutable_queue is missing a clear() function, i.e. a low overhead way of emptying the entire queue (without resorting to repeated pops). However, I think clear() can be implemented as follows:
void clear() { clear(); }
Which is efficient and (often) fast.
Surely that one only runs until you blow the stack. Am I missing something? -- Dave Abrahams Boost Consulting www.boost-consulting.com