C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Delete...why not a parameter by reference?!

From: organicoman <organicoman_at_[hidden]>
Date: Sat, 23 Aug 2025 07:15:33 +0100
The direct answer to "why is it not a reference" is the same as for why we have "*this" - these features were added to the language early, long before we even had references.C++ has a long history of not removing existing parts of the language, but instead add new alternatives. This is one of those cases - delete uses a pointer, because it always has.But if we change it from a copy to a reference, it won't break anything. The call sites will be the same, and the function signature is compatible. So?-- Std-Proposals mailing listStd-Proposals_at_[hidden]://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-08-23 06:15:39