Bug 685236 - Make char16ptr_t::operator bool() explicit. r?froydnj draft
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sun, 24 Dec 2017 23:33:56 +0900
changeset 715681 7dbf79e7bf4fdce6f45775ee43793f00f0b05376
parent 715663 f78a83244fbebe8a469ae3512fce7f638cab7e1f
child 715682 3bf634d2d42d9970f9ea7d72432091c34281bd5b
push id94228
push userVYV03354@nifty.ne.jp
push dateThu, 04 Jan 2018 11:56:10 +0000
reviewersfroydnj
bugs685236
milestone59.0a1
Bug 685236 - Make char16ptr_t::operator bool() explicit. r?froydnj clang-cl fails to build without this change sue to ambiguous call. MozReview-Commit-ID: 22x5PCsG221
mfbt/Char16.h
--- a/mfbt/Char16.h
+++ b/mfbt/Char16.h
@@ -61,17 +61,17 @@ public:
   {
     return const_cast<wchar_t*>(reinterpret_cast<const wchar_t*>(mPtr));
   }
 
   operator const void*() const
   {
     return mPtr;
   }
-  MOZ_IMPLICIT operator bool() const
+  explicit operator bool() const
   {
     return mPtr != nullptr;
   }
 
   /* Explicit cast operators to allow things like (char16_t*)str. */
   explicit operator char16_t*() const
   {
     return const_cast<char16_t*>(mPtr);