add a user-provided constructor to emulated c++11 NullPtr
According to this GCC bug/patch, a user-specified constructor is
required for the emulated C++11 nullptr_t class if we want to be able
to create const nullptr_t objects without an explicit initializer,
a la: "const std::nullptr_t nullptr;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42844
This fixes a build failure in GCC 4.5.
BUG=374431
Review URL: https://codereview.chromium.org/322913002
git-svn-id: svn://svn.chromium.org/blink/trunk@175874 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/third_party/WebKit/Source/wtf/NullPtr.h b/third_party/WebKit/Source/wtf/NullPtr.h
index b6b34e4..83c9687 100644
--- a/third_party/WebKit/Source/wtf/NullPtr.h
+++ b/third_party/WebKit/Source/wtf/NullPtr.h
@@ -49,6 +49,12 @@
namespace std {
class nullptr_t {
public:
+ // Required in order to create const nullptr_t objects without an
+ // explicit initializer in GCC 4.5, a la:
+ //
+ // 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.