[C++ DR 2336] virtual dtors, exception specs & abstract classes

Nathan Sidwell nathan@acm.org
Thu Nov 15 15:50:00 GMT 2018


This patch implements dr2336, a fix to dr1658

dr1658 made virtual bases of abstract classes ignored for synthesize 
cdtors -- there are no complete objects of such type, so the vbases will 
never be cdtored by such cdtors.

Except when virtual dtors are in play, such a dtor could override a 
virtual dtor in a virtual base, and thus must not have a stricter 
exception specification.  DR2336 addresses that.

I had nearly anticipated this resolution, but I was also looking into 
virtual bases in other cases, and ignoring access in different other 
cases.   This implements the DR2336 wording (it does not distinguish 
between virtual and non-virtual dtors of virtual bases).

booted on x6_64-linux, committing to trunk.

nathan
-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dr2336.diff
Type: text/x-patch
Size: 5110 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181115/09bbf43c/attachment.bin>


More information about the Gcc-patches mailing list