From: Alberto Barbati (abarbati_at_[hidden])
Date: 2004-03-08 05:22:48
Thorsten Ottosen wrote:
> "Alberto Barbati" <abarbati_at_[hidden]> wrote in message
>>That is good. However, I think that such optimization is unnecessary.
>>For primitive types, the destructor is trivial and the copy constructor
>>is the assignment, so I bet a reasonably good compiler can optimize the
>>dtor/ctor idiom to a simple assigment even without any "help" in the
>>form of template machinery. Besides, bad compilers may introduce
> The cases where a call to a destructor is actually important beacuse it does
> non-trivial work, one really need
> to ensure not even temporary objects of the type exists. That's one of the
> capabilities my smart containers will allow, ie, "overwriting" really means
> destructing and replacing.
I'm sorry, I don't understand what you are trying to say here. I started
my sentence with "For primitive types"...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk