浏览代码

Remove MSVC workarounds. Patch from STL@microsoft.com

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283580 91177308-0d34-0410-b5e6-96231b3b80d8
Eric Fiselier 9 年之前
父节点
当前提交
45a9570f5d
共有 1 个文件被更改,包括 2 次插入8 次删除
  1. 2 8
      test/support/test_allocator.h

+ 2 - 8
test/support/test_allocator.h

@@ -88,10 +88,7 @@ public:
         {::new(static_cast<void*>(p)) T(std::forward<U>(val));}
         {::new(static_cast<void*>(p)) T(std::forward<U>(val));}
 #endif
 #endif
     void destroy(pointer p)
     void destroy(pointer p)
-        {
-            p->~T();
-            ((void)p); // Prevent MSVC's spurious unused warning
-        }
+        {p->~T();}
     friend bool operator==(const test_allocator& x, const test_allocator& y)
     friend bool operator==(const test_allocator& x, const test_allocator& y)
         {return x.data_ == y.data_;}
         {return x.data_ == y.data_;}
     friend bool operator!=(const test_allocator& x, const test_allocator& y)
     friend bool operator!=(const test_allocator& x, const test_allocator& y)
@@ -291,10 +288,7 @@ public:
 
 
     template<typename U, typename... Args>
     template<typename U, typename... Args>
     void destroy(U* p)
     void destroy(U* p)
-    {
-        p->~U();
-        ((void)p); // Prevent MSVC's spurious unused warning
-    }
+    { p->~U(); }
 };
 };
 
 
 template<typename T, typename U>
 template<typename T, typename U>