MantisBT - Community
View Issue Details
0029006Community[OCCT] OCCT:Codingpublic2017-08-16 17:442018-10-03 18:25
Vico Liang 
kgv 
lowfeature 
closedno change required 
 
[OCCT] 7.4.0 
0029006: Coding Rules - define Standard_NULL to replace NULL
Why not define Standard_NULL macro to present a null pointer? it can be defined as nullptr for new version C++ 11 and 0 for old version.
No tags attached.
Issue History
2017-08-16 17:44Vico LiangNew Issue
2017-08-16 17:44Vico LiangAssigned To => kgv
2017-08-17 13:38kgvPrioritynormal => low
2017-08-17 13:38kgvSeverityminor => feature
2017-08-17 13:39kgvSummaryDefine Standard_NULL to replace NULL => Coding Rules - define Standard_NULL to replace NULL
2018-10-01 08:30kgvAssigned Tokgv => abv
2018-10-01 08:30kgvStatusnew => feedback
2018-10-01 12:51kgvNote Added: 0079557
2018-10-02 09:52msvNote Added: 0079571
2018-10-02 15:16abvNote Added: 0079600
2018-10-02 15:16abvAssigned Toabv => Vico Liang
2018-10-02 15:16abvNote Edited: 0079600bug_revision_view_page.php?bugnote_id=79600#r20018
2018-10-03 17:21Vico LiangNote Added: 0079649
2018-10-03 17:23Vico LiangAssigned ToVico Liang => kgv
2018-10-03 17:23Vico LiangStatusfeedback => acknowledged
2018-10-03 18:25abvNote Added: 0079653
2018-10-03 18:25abvStatusacknowledged => closed
2018-10-03 18:25abvResolutionopen => no change required

Notes
(0079557)
kgv   
2018-10-01 12:51   
Dear colleagues,

please share your opinion about this feature.
(0079571)
msv   
2018-10-02 09:52   
What benefits will it bring?
(0079600)
abv   
2018-10-02 15:16   
I deem 0 can represent NULL pointer pretty well. I understand that there is some rationale behind nullptr, but prefer not to define our own alternative. Let's wait until we abandon support of VS 2010 and then we can use standard nullptr.

(0079649)
Vico Liang   
2018-10-03 17:21   
nullptr is supported in most modern C++ compiler. No objection to use standard nullptr.
(0079653)
abv   
2018-10-03 18:25   
Yep, nullptr is supported by VS 2010, sorry for mistake. Thus there is no issue - we can use nullptr.

I am closing the issue.