Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-02-20 17:34:39


Peter Dimov wrote:
[snip]
> Destroying a const object is fine, but there is no reason to have a const
in
> the argument.
>
> template<class T> void call_destructor(T & t) { t.~T(); }
>
> X const x;
>
> f(x); // OK, T = X const
>
> f(5); // compile-time fail

Good point. Even though the class is in the detail namespace, I think it's a
good change to make.

Thanks,
Eric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk