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

@@ -334,3 +334,6 @@ bool Vector3i::operator>=(const Vector3i &p_v) const {
void Vector3i::zero() {
x = y = z = 0;
}
template <>
struct is_zero_constructible<Vector3i> : std::true_type {};