Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/base/inc/RtypesCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ typedef float Size_t; //Attribute size (float)
//---- constants ---------------------------------------------------------------

#ifndef NULL
#define NULL 0
constexpr const auto R__DEPRECATED(6,12, "Please #include <cstddef> instead of relying on ROOT's NULL")
NULL = nullptr;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it would be better to either use #define NULL ((void*)0) to be compatible with C, or simply remove it from ROOT altogether and just #include <cstddef> to get it from the standard. I wonder what happens when one uses nullptr to call something from a C library. Won't things break? If not, then just including the standard header is probably the best solution. References: C and C++ versions of NULL.

#endif

const Bool_t kTRUE = true;
Expand Down