Typed fixed vector#737
Draft
wvpm wants to merge 6 commits into
Draft
Conversation
ebff5ff to
1dd904b
Compare
Spartan322
reviewed
May 16, 2026
Comment on lines
+15
to
+16
| struct create_empty_t { }; | ||
| struct generate_values_t { }; |
Member
There was a problem hiding this comment.
Suggested change
| struct create_empty_t { }; | |
| struct generate_values_t { }; | |
| struct create_empty_t { }; | |
| static consexpr create_empty_t create_empty {}; | |
| struct generate_values_t { }; | |
| static constexpr generate_values_t generate_values {}; |
Than you can do create_empty and generate_values instead of create_empty_t {} and generate_values_t {}.
Spartan322
reviewed
May 16, 2026
| std::fill(_data_start_ptr, _data_start_ptr + get_index_as_size_t(size), value_for_all_indices); | ||
| } | ||
|
|
||
| constexpr explicit FixedVector(const size_type capacity, generate_values_t) |
Member
There was a problem hiding this comment.
In C++ its usually preferred for the tag to come first so
Suggested change
| constexpr explicit FixedVector(const size_type capacity, generate_values_t) | |
| constexpr explicit FixedVector(generate_values_t, const size_type capacity) |
Spartan322
reviewed
May 16, 2026
| * @brief Creates an uninitialised vector with fixed capacity | ||
| */ | ||
| constexpr explicit FixedVector(const size_t capacity) | ||
| constexpr explicit FixedVector(const size_type capacity, create_empty_t) |
Member
There was a problem hiding this comment.
In C++ its usually preferred for the tag to come first so
Suggested change
| constexpr explicit FixedVector(const size_type capacity, create_empty_t) | |
| constexpr explicit FixedVector(create_empty_t, const size_type capacity) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.