[PATCH] D43159: Modernize: Use nullptr more.

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 11 11:55:35 PST 2018


dim added a comment.

LGTM minus a few nits, though it would be nice if you can verify that all the changed headers still compile in `-std=c++98` and/or `-std=gnu++98` mode.



================
Comment at: include/functional:1573
         return &__f_.first();
-    return (const void*)0;
+    return (const void*)nullptr;
 }
----------------
The cast can be removed now.


================
Comment at: include/valarray:805
     _LIBCPP_INLINE_VISIBILITY
-    valarray() : __begin_(0), __end_(0) {}
+    valarray() : __begin_(nullptr), __end_(0) {}
     inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
----------------
Missed `__end` here?


Repository:
  rCXX libc++

https://reviews.llvm.org/D43159





More information about the cfe-commits mailing list