Suppress stupid and incorrect MSVC warning. patch from STL@microsoft.com

llvm-svn: 273350
This commit is contained in:
Eric Fiselier 2016-06-22 01:02:08 +00:00
parent df839e04b4
commit 408d6ebd2d
1 changed files with 5 additions and 1 deletions

View File

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