Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1889)

Unified Diff: Source/wtf/NullPtr.h

Issue 322913002: add a user-provided constructor to emulated c++11 NullPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: another attempt at a readable comment Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/NullPtr.h
diff --git a/Source/wtf/NullPtr.h b/Source/wtf/NullPtr.h
index b6b34e444160a8fb0054ef30f705a6ab7d7d534d..c884e9ec1b42aa34efa7d483b5b44ea1a980e45e 100644
--- a/Source/wtf/NullPtr.h
+++ b/Source/wtf/NullPtr.h
@@ -49,6 +49,12 @@ typedef decltype(nullptr) nullptr_t;
namespace std {
class nullptr_t {
public:
+ // Required in order to create const nullptr_t objects without an
+ // explicit initializer, a la:
Mikhail 2014/06/10 07:15:24 As I see at https://gcc.gnu.org/bugzilla/show_bug.
Mostyn Bramley-Moore 2014/06/10 07:33:58 I think the second clause matches here (not the fi
+ //
+ // const std::nullptr_t nullptr;
+ nullptr_t() { }
+
// Make nullptr convertible to any pointer type.
template<typename T> operator T*() const { return 0; }
// Make nullptr convertible to any member pointer type.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698