BLI: Add move construction and copy assignment to BitGroupVector #122100
@ -40,7 +40,12 @@ class BitGroupVector {
|
||||
}
|
||||
|
||||
public:
|
||||
BitGroupVector() = default;
|
||||
BitGroupVector(Allocator allocator = {}) noexcept : data_(allocator) {}
|
||||
|
||||
BitGroupVector(NoExceptConstructor, Allocator allocator = {}) noexcept
|
||||
: BitGroupVector(allocator)
|
||||
{
|
||||
}
|
||||
|
||||
BitGroupVector(const int64_t size_in_groups,
|
||||
const int64_t group_size,
|
||||
@ -61,6 +66,23 @@ class BitGroupVector {
|
||||
{
|
||||
}
|
||||
|
||||
BitGroupVector(BitGroupVector &&other)
|
||||
: group_size_(other.group_size_),
|
||||
aligned_group_size_(other.aligned_group_size_),
|
||||
data_(std::move(other.data_))
|
||||
{
|
||||
}
|
||||
|
||||
BitGroupVector &operator=(const BitGroupVector &other)
|
||||
{
|
||||
return copy_assign_container(*this, other);
|
||||
}
|
||||
|
||||
BitGroupVector &operator=(BitGroupVector &&other)
|
||||
{
|
||||
return move_assign_container(*this, std::move(other));
|
||||
}
|
||||
|
||||
/** Get all the bits at an index. */
|
||||
BoundedBitSpan operator[](const int64_t i) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user