Date: Tue, 1 Jul 2025 21:45:51 +0000
I certainly appreciate that the delete/delete[] mix is a rough edge in the language, but I'm going to echo sentiment elsewhere in the thread that this is a far more breaking change than you initially suggested. Equally, I'm not sure that allowing decay from T[] to T* is necessarily a good idea towards solving the problem. It's easy to imagine some code which accidentally performs that decay, passes a decayed array-type pointer to regular delete, and then we're back to square one except the mistake is much more implicit because passing arrays to the "normal" delete operator is now the expected thing to do.
If we could go back in time and design C++98 differently then perhaps we'd want to do something along this line. But if this idea does evolve into a paper I'd want to see a thorough examination of all the many places in the language it touches and what the radius for breakage of existing code is; and a far stronger motivation to support such breakage.
If we could go back in time and design C++98 differently then perhaps we'd want to do something along this line. But if this idea does evolve into a paper I'd want to see a thorough examination of all the many places in the language it touches and what the radius for breakage of existing code is; and a far stronger motivation to support such breakage.
Received on 2025-07-01 21:45:56