cpp-docs icon indicating copy to clipboard operation
cpp-docs copied to clipboard

Improve C2469 error reference

Open Rageking8 opened this issue 5 months ago • 4 comments

  • Change error message to one with explicit reference to new and void as it seems newer (commit https://github.com/MicrosoftDocs/cpp-docs/commit/062031c7e1454df22636fe97788b729f8a24a0e8 added this variant to the index page, while the older one is there since the first commit in 2016) and the error does not seem to apply to anything other than operator new with type void.
  • Add "Remarks" heading and tweak its contents to reflect the new error message.
  • Overhaul the existing example and add a new one based on the user's intent (i.e. they specified the wrong allocation type versus they made an invalid attempt to allocate untyped memory (see c++ - Using new on void pointer - Stack Overflow)).
  • Update metadata

Rageking8 avatar Jul 23 '25 09:07 Rageking8