On Mon, 23 Jan 2012 18:09:58 +0200, Robert Caravani <[email protected]>
wrote:
Thanks for the links, it was a good read.
I think it is the best answer to the problem.
What's the destructor limitation?
struct S {
static S* make(); // constructor
static void purge(S*); // destructor - you have to provide this as well
}
Limitation is that just like constructor, we also lose the destructor.
Which means we can't use "delete", and the tools designed for it.
As a result we don't have something new. It is exactly like C impl. hiding.
struct S;
S* make();
void purge(S*);