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

small_vector and small_string are not trivially copiable #2

Closed
cschreib opened this issue Oct 17, 2022 · 0 comments · Fixed by #3
Closed

small_vector and small_string are not trivially copiable #2

cschreib opened this issue Oct 17, 2022 · 0 comments · Fixed by #3
Labels
enhancement New feature or request

Comments

@cschreib
Copy link
Member

Because of the pointer stored in the basic_small_vector member. This also prevents constructors from being truly constexpr, so these types cannot be created at compile time.

The trick of basic_small_vector was used so that we could implement functions using these classes, without needing a template argument for the maximum size.

There are other ways to achieve this.

One would be to have basic_small_vector be created on the fly rather than stored, and have it hold a pointer to the size (so it can update it). Then it should be renamed small_vector_view.

This is likely required to implement #1.

@cschreib cschreib added the enhancement New feature or request label Oct 17, 2022
cschreib added a commit that referenced this issue Oct 17, 2022
cschreib added a commit that referenced this issue Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant