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

Add constexpr_vector class #415

Merged
merged 2 commits into from
Jul 9, 2020
Merged

Add constexpr_vector class #415

merged 2 commits into from
Jul 9, 2020

Conversation

gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Jul 8, 2020

Required for #403

@codecov
Copy link

codecov bot commented Jul 8, 2020

Codecov Report

Merging #415 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #415   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files          47       49    +2     
  Lines       13189    13232   +43     
=======================================
+ Hits        13080    13123   +43     
  Misses        109      109           

@gumb0 gumb0 marked this pull request as ready for review July 8, 2020 14:05
Copy link
Member

@axic axic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me, but would wait for @chfast.

Copy link
Collaborator

@chfast chfast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the end I think it is fine to have it.

/// It allows to have a collection (constexpr array) of such lists, where list lengths vary across
/// the collection, but each length is still known at compile time (and doesn't exceed MaxSize
/// limit).
template <typename T, std::size_t MaxSize>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
template <typename T, std::size_t MaxSize>
template <typename T, std::size_t MaxCapacity>

Or just Capacity.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to Capacity

/// the collection, but each length is still known at compile time (and doesn't exceed MaxSize
/// limit).
template <typename T, std::size_t MaxSize>
class constexpr_vector
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gumb0 gumb0 merged commit b0a4822 into master Jul 9, 2020
@gumb0 gumb0 deleted the constexpr-vector branch July 9, 2020 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants