Why is not deleting an object that has a destructor with a side effect undefined behavior in C++11?

前端 未结 4 722
心在旅途
心在旅途 2020-12-11 04:03

This answer quotes C++11 Standard 3.8:

if there is no explicit call to the destructor or if a delete-expression (5.3.5) is not used to release the sto

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 04:27

    In this case, we do have a precise answer. The specific line was introduced to resolve CWG 1116, "Aliasing of union members".

提交回复
热议问题