[Bug c++/104266] Temporaries with protected destructor are erroneously permitted

de34 at live dot cn gcc-bugzilla@gcc.gnu.org
Fri Jan 28 15:59:26 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104266

Jiang An <de34 at live dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |de34 at live dot cn

--- Comment #1 from Jiang An <de34 at live dot cn> ---
I think this is CWG DR 2227 (https://wg21.link/cwg2227).

And IIUC although it is correct to reject this code, clang's error message is
wrong, because there's no temporary of type 'A' created due to guaranteed RVO
since C++17.


More information about the Gcc-bugs mailing list