|
Boost : |
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-07-21 13:48:14
David Abrahams wrote:
> In some cases, only. Every bit of code in the system needs to agree to use
> the throw() specification religiously. Take this imaginary example:
>
> template <class T>
> inline boost::auto_ptr<T>::~auto_ptr() throw()
> {
> delete this->get();
> }
>
> What happens if T's destructor does not have an empty
> exception-specification?
Indeed, exceptions are a bit like const: us it everywhere
or not at all. We all agree to be const-correct, but:
- failure to use const correctly is diagnosed by the
compiler, failure to use ES (exception specs) isn't.
- the std lib is const-correct, but almost only the
language support part (memory allocation, EH) uses
ES
-- Valentin Bonnard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk