Core: Expand is_zero_constructible coverage

This commit is contained in:
Thaddeus Crews
2025-03-15 11:09:01 -05:00
parent 9e6ee9c5c3
commit 4320800621
11 changed files with 49 additions and 0 deletions

View File

@@ -77,6 +77,10 @@ struct PairHash {
}
};
// Pair is zero-constructible if and only if both constrained types are zero-constructible.
template <typename F, typename S>
struct is_zero_constructible<Pair<F, S>> : std::conjunction<is_zero_constructible<F>, is_zero_constructible<S>> {};
template <typename K, typename V>
struct KeyValue {
const K key;
@@ -109,3 +113,7 @@ struct KeyValueSort {
return A.key < B.key;
}
};
// KeyValue is zero-constructible if and only if both constrained types are zero-constructible.
template <typename K, typename V>
struct is_zero_constructible<KeyValue<K, V>> : std::conjunction<is_zero_constructible<K>, is_zero_constructible<V>> {};