Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/smallvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ struct TaggedAllocator : std::allocator<T>
TaggedAllocator(Ts&&... ts)
: std::allocator<T>(std::forward<Ts>(ts)...)
{}

template<class U>
TaggedAllocator(const TaggedAllocator<U, N>);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this constructor has no implementation right? Should it be marked with =delete?

Copy link
Owner

@danmar danmar May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't test it but I wonder if this constructor should be removed and let the other constructor be used instead. What happens if you comment out line 45 and 46 and recompile?


template<class U>
struct rebind
{
using other = TaggedAllocator<U, N>;
};
};

template<typename T, std::size_t N = DefaultSmallVectorSize>
Expand Down