How does delete deal with pointer constness?

前端 未结 5 1993
不知归路
不知归路 2021-01-18 00:30

I was reading this question Deleting a const pointer and wanted to know more about delete behavior. Now, as per my understanding:

delete expressio

5条回答
  •  既然无缘
    2021-01-18 01:02

    As this answer says, delete is not a method like any other, but a part of the langage to destruct objects. const-ness has no bearing on destructability.

提交回复
热议问题