Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Enumeration API when passed std::vector<bool> #4362

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

davisp
Copy link
Contributor

@davisp davisp commented Sep 17, 2023

I forgot to account for the fact that std::vector<bool> is a specialized template which uses an internal bitmap instead of a standard backing array.

Also note that boolean enumerations can be created, they just have to use a std::vector<uint8_t> and manually specify the data type like such:

std::vector<uint8_t> values = {0, 1};
auto enmr = Enumeration::create(ctx, "my_enmr", values, false, TILEDB_BOOL);

TYPE: BUG
DESC: Fix creation of Enumerations with std::vector<bool>

@shortcut-integration
Copy link

@davisp davisp requested a review from johnkerl September 17, 2023 19:21
@ihnorton ihnorton requested a review from KiterLuc September 18, 2023 12:50
I forgot to account for the fact that `std::vector<bool>` is a
specialized template which uses an internal bitmap instead of a standard
backing array.
@davisp davisp force-pushed the pd/sc-34308/fix-bool-enumeration-creation branch from 0b1e5d3 to c9abd5a Compare September 18, 2023 19:09
@KiterLuc KiterLuc merged commit 41bc0f2 into dev Sep 19, 2023
52 checks passed
@KiterLuc KiterLuc deleted the pd/sc-34308/fix-bool-enumeration-creation branch September 19, 2023 08:18
ihnorton pushed a commit that referenced this pull request Sep 22, 2023
I forgot to account for the fact that `std::vector<bool>` is a
specialized template which uses an internal bitmap instead of a standard
backing array.

(cherry picked from commit 41bc0f2)
ihnorton pushed a commit that referenced this pull request Sep 24, 2023
I forgot to account for the fact that `std::vector<bool>` is a
specialized template which uses an internal bitmap instead of a standard
backing array.

(cherry picked from commit 41bc0f2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants