Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-02-18 18:16:54

"Itay Maman" <itay_maman_at_[hidden]> wrote in message
"David B. Held" wrote:
> > [...]
> > template <typename T>
> > void operator()(const T& operand) const
> > {
> > operand.~T();
> > }
> > [...]
> Is the destructor really a const function?
> The object being destroyed is the formal parameter "operand".
> The object whose operator() is called is not changed at all, thus
> the 'const' qualification is in place.

I realize that the operator ought to be const. But should the reference
be? I guess I don't know if you should be able to call a d'tor on a
const& or not.


Boost list run by bdawes at, gregod at, cpdaniel at, john at