Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class chunk_t
- {
- public:
- explicit chunk_t();
- ~chunk_t();
- static chunk_t create_from(const roaring_bitmap_t &data, bool filled = false);
- private:
- bool filled = false;
- roaring_bitmap_t *data = nullptr;
- explicit chunk_t(const chunk_t &other);
- };
- chunk_t::chunk_t()
- {
- this->data = roaring_bitmap_create_with_capacity(C);
- }
- chunk_t::chunk_t(const chunk_t &other)
- {
- _ASSERT(other.data != nullptr);
- this->data = roaring_bitmap_copy(other.data);
- this->filled = other.filled;
- }
- chunk_t chunk_t::create_from(const roaring_bitmap_t &data, bool filled)
- {
- chunk_t c;
- c.data = roaring_bitmap_copy(&data);
- c.filled = filled;
- return c; // ERROR: class `chunk_t` has no suitable copy constructor
- }
- chunk_t::~chunk_t()
- {
- if(this->data != nullptr)
- {
- roaring_bitmap_free(this->data);
- this->data = nullptr;
- }
- }
Add Comment
Please, Sign In to add comment