Add missing rebinding trait to TaggedAllocator (complete #5015) (#5146)

This commit is contained in:
chrchr-github 2023-06-13 11:22:43 +02:00 committed by GitHub
parent 09cd3a8269
commit 6f56a9563e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -41,6 +41,17 @@ struct TaggedAllocator : std::allocator<T>
TaggedAllocator(Ts&&... ts) TaggedAllocator(Ts&&... ts)
: std::allocator<T>(std::forward<Ts>(ts)...) : std::allocator<T>(std::forward<Ts>(ts)...)
{} {}
template<class U>
// cppcheck-suppress noExplicitConstructor
// NOLINTNEXTLINE(google-explicit-constructor)
TaggedAllocator(const TaggedAllocator<U, N> /*unused*/) {}
template<class U>
struct rebind
{
using other = TaggedAllocator<U, N>;
};
}; };
template<typename T, std::size_t N = DefaultSmallVectorSize> template<typename T, std::size_t N = DefaultSmallVectorSize>