throw specs on Standard destructors

Benjamin Kosnik bkoz@redhat.com
Wed Dec 11 09:24:00 GMT 2002


On Wed, 11 Dec 2002 08:34:27 -0800
Nathan Myers <ncm-nospam@cantrip.org> wrote:

>No.  An implementation is not required to declare destructors throw().
>Any code that fails if they're not so declared is broken, because it
>assumes an implementation detail that the standard doesn't specify.  

Sadly, agreed.

However, this code does compile with 2.95/2.96 (but not with 3.x series
compilers). Adding the string and auto_ptr bits, conditionally so that
-pedantic will remove them, seems to be the solution.

-benjamin



More information about the Libstdc++ mailing list