small_vector
and small_string
are not trivially copiable
#2
Labels
enhancement
New feature or request
small_vector
and small_string
are not trivially copiable
#2
Because of the pointer stored in the
basic_small_vector
member. This also prevents constructors from being trulyconstexpr
, 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 renamedsmall_vector_view
.This is likely required to implement #1.
The text was updated successfully, but these errors were encountered: