C++11 delete some contructors which are not wanted.
authorStephen Kelly <stephen.kelly@kdab.com>
Sun, 8 Jan 2012 19:21:34 +0000 (20:21 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 10 Jan 2012 00:44:13 +0000 (01:44 +0100)
Change-Id: I844a0872e81f1824928814edb8d21c0b6384283d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/kernel/qvariant.h

index 28bddc1..12a512f 100644 (file)
@@ -389,10 +389,10 @@ public:
 
 private:
     // force compile error, prevent QVariant(bool) to be called
-    inline QVariant(void *) { Q_ASSERT(false); }
+    inline QVariant(void *) Q_DECL_EQ_DELETE;
 #ifdef QT_NO_CAST_FROM_ASCII
     // force compile error when implicit conversion is not wanted
-    inline QVariant(const char *) { Q_ASSERT(false); }
+    inline QVariant(const char *) Q_DECL_EQ_DELETE;
 #endif
 public:
     typedef Private DataPtr;