Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 880 Bytes

File metadata and controls

24 lines (18 loc) · 880 Bytes
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
C26477
USE_NULLPTR_NOT_CONSTANT
helpviewer_keywords
C26477
ms.assetid d5395efc-5eb2-4e82-9b45-fcd5ff4577bf
author kylereedmsft
ms.author kylereed
ms.custom kr2b-contr-experiment

Warning C26477

Use 'nullptr' rather than 0 or NULL (es.47)

Remarks

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

See also

C++ Core Guideline ES.47