| description | Learn more about the C26477 USE_NULLPTR_NOT_CONSTANT C++ Core Guidelines Checker warning. The nullptr value allows overloads with special null handling. | ||
|---|---|---|---|
| title | Warning C26477 | ||
| ms.date | 04/29/2022 | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | d5395efc-5eb2-4e82-9b45-fcd5ff4577bf | ||
| author | kylereedmsft | ||
| ms.author | kylereed | ||
| ms.custom | kr2b-contr-experiment |
Use '
nullptr' rather than 0 or NULL (es.47)
nullptr has a special type nullptr_t that allows overloads with special null handling. Using 0 or NULL in place of nullptr bypasses the type safety and deduction that nullptr provides.
Code analysis name: USE_NULLPTR_NOT_CONSTANT