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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 14:41:03 PST 2022


efriedma added inline comments.


================
Comment at: llvm/include/llvm/Support/Allocator.h:85
+  template <typename T>
+  BumpPtrAllocatorImpl(BumpPtrAllocatorImpl<T> &) = delete;
+
----------------
This isn't using the right template parameters. I'd suggest just `BumpPtrAllocatorImpl(const BumpPtrAllocatorImpl &) = delete;`.  Or I guess you could do something like `template <typename AllocatorT, size_t SlabSize, size_t SizeThreshold, size_t GrowthDelay> BumpPtrAllocatorImpl(const BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold, GrowthDelay> &) = delete;`.


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