[libcxx-commits] [PATCH] D112220: Remove unsused construct/destroy from test_allocator.h
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 21 07:33:13 PDT 2021
philnik created this revision.
philnik added a reviewer: ldionne.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112220
Files:
libcxx/test/support/test_allocator.h
Index: libcxx/test/support/test_allocator.h
===================================================================
--- libcxx/test/support/test_allocator.h
+++ libcxx/test/support/test_allocator.h
@@ -139,15 +139,6 @@
{assert(data_ >= 0); --alloc_count; ::operator delete((void*)p);}
size_type max_size() const TEST_NOEXCEPT
{return UINT_MAX / sizeof(T);}
-#if TEST_STD_VER < 11
- void construct(pointer p, const T& val)
- {::new(static_cast<void*>(p)) T(val);}
-#else
- 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();}
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)
@@ -203,14 +194,6 @@
{assert(data_ >= 0); --alloc_count; ::operator delete((void*)p); }
size_type max_size() const TEST_NOEXCEPT
{return UINT_MAX / sizeof(T);}
-#if TEST_STD_VER < 11
- void construct(pointer p, const T& val)
- {::new(static_cast<void*>(p)) T(val);}
-#else
- 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();}
friend bool operator==(const non_default_test_allocator& x, const non_default_test_allocator& y)
{return x.data_ == y.data_;}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112220.381258.patch
Type: text/x-patch
Size: 1494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211021/7c1d81e5/attachment.bin>
More information about the libcxx-commits
mailing list