gnzlbg / static_vector

A dynamically-resizable vector with fixed capacity and embedded storage
https://gnzlbg.github.io/static_vector
167 stars 21 forks source link

Should have `standard_layout` if `standard_layout<T>`. #35

Open gnzlbg opened 6 years ago

gnzlbg commented 6 years ago

Make the layout of this container be "standard layout" if the member elements are "standard layout".

YukinoHayakawa commented 3 years ago

Besides, since static_vector<T> only uses trivial storage when T is trivially constructible, it won't have a trivial destructor even if T is trivially destructible. That forbids me from getting any trivially destructible static_vector other than for 1 dimension.