From 6f56a9563edbdd7663ef86399fbd38a11325dde8 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Tue, 13 Jun 2023 11:22:43 +0200 Subject: [PATCH] Add missing rebinding trait to TaggedAllocator (complete #5015) (#5146) --- lib/smallvector.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/smallvector.h b/lib/smallvector.h index 42c45a173..b09a016dd 100644 --- a/lib/smallvector.h +++ b/lib/smallvector.h @@ -41,6 +41,17 @@ struct TaggedAllocator : std::allocator TaggedAllocator(Ts&&... ts) : std::allocator(std::forward(ts)...) {} + + template + // cppcheck-suppress noExplicitConstructor + // NOLINTNEXTLINE(google-explicit-constructor) + TaggedAllocator(const TaggedAllocator /*unused*/) {} + + template + struct rebind + { + using other = TaggedAllocator; + }; }; template