cpp-docs
cpp-docs copied to clipboard
Improve C2469 error reference
- Change error message to one with explicit reference to
newandvoidas 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 operatornewwith typevoid. - 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