Skip to content

Commit 738b14f

Browse files
authored
[array.creation] Clarify "Mandates" for to_array overloads (#7286)
It's confusing that these `to_array` overloads require `T` to be constructible from various types, when they actually construct `remove_cv_t<T>` objects. We experts know that initialization doesn't depend on the cv-qualification of the target type ([dcl.init.general]/16), but there's no need to make readers jump through hoops to understand the spec.
1 parent 08b167d commit 738b14f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/containers.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6460,7 +6460,7 @@
64606460
\pnum
64616461
\mandates
64626462
\tcode{is_array_v<T>} is \tcode{false} and
6463-
\tcode{is_constructible_v<T, T\&>} is \tcode{true}.
6463+
\tcode{is_constructible_v<remove_cv_t<T>, T\&>} is \tcode{true}.
64646464

64656465
\pnum
64666466
\expects
@@ -6481,7 +6481,7 @@
64816481
\pnum
64826482
\mandates
64836483
\tcode{is_array_v<T>} is \tcode{false} and
6484-
\tcode{is_move_constructible_v<T>} is \tcode{true}.
6484+
\tcode{is_constructible_v<remove_cv_t<T>, T>} is \tcode{true}.
64856485

64866486
\pnum
64876487
\expects

0 commit comments

Comments
 (0)