Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-02-18 18:30:07

David B. Held wrote:
> 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.

My understanding is that since the following is legal...

  const T* p = ...;
  delete p; is what you see in variant.hpp:

  const T& r = ...;

Even if my understanding is correct though, it may be best for destroyer to
take a non-const reference to avoid confusion.



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