Michel Fortin wrote:
On 2010-08-09 20:53:16 -0400, Andrei Alexandrescu
<[email protected]> said:
Jonathan M Davis wrote:
I would take that as an argument for making clear() set the object in
the state prior to the constructor call.
[snip]
I agree. Do others?
Well, allowing clear on any class is dangerous for a program's integrity
as a whole, whether you call a destructor or not.
So my opinion is that it should either not exist, if it exists it should
be buried somewhere with other functions that subvert the type system,
clear() would not subvert the type system.
Andrei