]> git.saurik.com Git - wxWidgets.git/commitdiff
use global operator new to fix compilation errors if type T overloads new (as wxObjec...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 Nov 2008 12:34:21 +0000 (12:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 Nov 2008 12:34:21 +0000 (12:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/vector.h

index 720d826ded84b6ef47e59a3dd168dee481a16d9b..2337d3d326b825b7cefb27d2316dc307dea38f45 100644 (file)
@@ -66,7 +66,7 @@ struct wxVectorMemOpsGeneric
         T *mem = (T*)::operator new(newCapacity * sizeof(T));
         for ( size_t i = 0; i < occupiedSize; i++ )
         {
-            new(mem + i) T(old[i]);
+            ::new(mem + i) T(old[i]);
             old[i].~T();
         }
         ::operator delete(old);
@@ -242,7 +242,7 @@ public:
         // use placement new to initialize new object in preallocated place in
         // m_values and store 'v' in it:
         void* const place = m_values + m_size;
-        new(place) value_type(v);
+        ::new(place) value_type(v);
 
         // only increase m_size if the ctor didn't throw an exception; notice
         // that if it _did_ throw, everything is OK, because we only increased