Boost logo

Boost :

From: Alberto Barbati (abarbati_at_[hidden])
Date: 2004-03-08 05:22:48

Thorsten Ottosen wrote:
> "Alberto Barbati" <abarbati_at_[hidden]> wrote in message
> news:c2gk5o$6v4$
>>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
>>pessimizations... ;)
> The cases where a call to a destructor is actually important beacuse it does
> some
> 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, gregod at, cpdaniel at, john at