-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implemented variable_size_binary_layout #32
Implemented variable_size_binary_layout #32
Conversation
569d3db
to
11d7b3b
Compare
* - offset: [0, 6, 11, 13, 15, 24, 30] | ||
* - data: ['p','l','e','a','s','e','a','l','l','o','w','m','e','t','o','i','n','t','r','o','d','u','c','e','m','y','s','e','l','f'] | ||
* | ||
* @tparam T the type of the data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in the example it is char
? or is it const char *
or string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value type is string
. They are all stored as a contiguous buffer of char. I've added some precisions in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like a clarification in that specific comment line, that here the value type is the one stored in the data buffer, and not the byte representation of it.
|
||
TEST_SUITE("variable_size_binary_layout") | ||
{ | ||
TEST_CASE_FIXTURE(vs_binary_fixture, "types") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a runtime test case when it's a bunch of compile-time checks.
I wonder if there is compile-time checks in doctest, I know there are in catch2 (I prefer doctest usually)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found such a feature in doctest. I can move these assertions to the fixture class itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that if any static assert needs to use that class, then the class must be defined before that use, so probably it's best to put them next but after that class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static asserts are on the layout_type defined in the fixture class, so I guess it's fine to keep the static assert in the fixture class?
c8681a1
to
c1076a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet another comment (I'll stop there).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mon ultime bafouille.
const_bitmap_iterator bitmap_cbegin() const; | ||
const_bitmap_iterator bitmap_cend() const; | ||
|
||
bool has_value(size_type i) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool has_value(size_type i) const; | |
bitmap_const_reference has_value(size_type i) const; |
Fix #39