Add is_zero_constructible to denote if a type can be semi-trivially constructed with all 0 bytes.

Optimize `CowData` and `LocalVector` resize for zero constructible types.
Mark several compatible types as `is_zero_constructible`.
This commit is contained in:
Lukas Tenbrink
2025-03-07 13:16:32 +01:00
parent 78c9f8ddd9
commit 75bc471965
19 changed files with 93 additions and 11 deletions

View File

@ -132,3 +132,6 @@ bool Plane::operator==(const Plane &p_plane) const {
bool Plane::operator!=(const Plane &p_plane) const {
return normal != p_plane.normal || d != p_plane.d;
}
template <>
struct is_zero_constructible<Plane> : std::true_type {};