Skip to content

Examine and replace NULL with std::nullptr #17

Description

@XenonofArcticus

In modern C++ (C++11 and later):

NULL is still defined, but it’s only a legacy macro, not a keyword.

It is defined in (and also in many headers that transitively include <stddef.h>).
#include // defines NULL as 0 or ((void*)0)

In C++11 and beyond, we should prefer nullptr instead of NULL, since nullptr has a dedicated type (std::nullptr_t) and avoids overload ambiguity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions