Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / wtf / text / WTFString.h
index 1e8388e..1bb2602 100644 (file)
@@ -382,13 +382,6 @@ public:
     String isolatedCopy() const;
     bool isSafeToSendToAnotherThread() const;
 
-    // Prevent Strings from being implicitly convertable to bool as it will be ambiguous on any platform that
-    // allows implicit conversion to another pointer type (e.g., Mac allows implicit conversion to NSString*).
-    typedef struct ImplicitConversionFromWTFStringToBoolDisallowedA* (String::*UnspecifiedBoolTypeA);
-    typedef struct ImplicitConversionFromWTFStringToBoolDisallowedB* (String::*UnspecifiedBoolTypeB);
-    operator UnspecifiedBoolTypeA() const;
-    operator UnspecifiedBoolTypeB() const;
-
 #if USE(CF)
     String(CFStringRef);
     RetainPtr<CFStringRef> createCFString() const;
@@ -444,6 +437,9 @@ public:
     }
 
 private:
+    typedef struct ImplicitConversionFromWTFStringToBoolDisallowed* (String::*UnspecifiedBoolType);
+    operator UnspecifiedBoolType() const;
+
     template <typename CharacterType>
     void removeInternal(const CharacterType*, unsigned, int);
 
@@ -668,7 +664,7 @@ template<> struct DefaultHash<String> {
     typedef StringHash Hash;
 };
 
-template <> struct VectorTraits<String> : SimpleClassVectorTraits {
+template <> struct VectorTraits<String> : SimpleClassVectorTraits<String> {
     static const bool canCompareWithMemcmp = false;
 };