mattkretz / wg21-papers

my papers to WG21 — the C++ committee
5 stars 7 forks source link

Wrong indirectly_writable parameter? #94

Open danieltowner opened 1 year ago

danieltowner commented 1 year ago

In copy_to, the constraint is indirectly_writable<value_type>, but should it actually be indirectly_writable<iter_value_t<Out>>? It seems like it should be checking that the output can be written to as the type of the iterator, without any complications arising from a conversion too.

mattkretz commented 1 year ago

My intent was to also constrain on the conversion being well-formed. Why would we ever want to allow a converting store that doesn't allow the conversion? Ah... when value_type isn't implicitly convertible to iter_value_t<Out>, a static_cast is well-formed and simdflags_convert was used?