[PATCH] D119580: [LLVM][Support] Delete non-const lvalue ref "copy" constructor of BumpPtrAllocatorImpl

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 18:32:28 PST 2022


dblaikie added inline comments.


================
Comment at: llvm/unittests/Support/AllocatorTest.cpp:49-58
+TEST(AllocatorTest, NoCopy) {
+  constexpr bool CopyConstructible =
+      std::is_copy_constructible<BumpPtrAllocator>::value;
+  EXPECT_FALSE(CopyConstructible);
+
+  constexpr bool NonConstLRefConstructible =
+      std::is_constructible<BumpPtrAllocator, BumpPtrAllocator &>::value;
----------------
Perhaps this could be done with a static_assert in the header - no need for a test case/runtime expect of the value?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119580/new/

https://reviews.llvm.org/D119580



More information about the llvm-commits mailing list