forked from OSchip/llvm-project
Suppress stupid and incorrect MSVC warning. patch from STL@microsoft.com
llvm-svn: 273350
This commit is contained in:
parent
df839e04b4
commit
408d6ebd2d
|
@ -87,7 +87,11 @@ public:
|
||||||
template <class U> void construct(pointer p, U&& val)
|
template <class U> void construct(pointer p, U&& val)
|
||||||
{::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) {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)
|
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)
|
||||||
|
|
Loading…
Reference in New Issue