https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122313

--- Comment #10 from Jiang An <de34 at live dot cn> ---
(In reply to Jonathan Wakely from comment #9)
> Jiang An, see comment 8 above. Should have been part of your LLVM pull
> request 116001?

I'm not very sure. My LLVM PR 116001 only touched vector<nonbool>. vector<bool>
was left untouched due to https://cplusplus.github.io/LWG/issue3297.

Currently wording strangely requires implicit convertibility, while implicit
conversion doesn't seem supposed to be used at all. Implementations should
perform assignments or (explicit) construction via allocator_traits::construct.

The situation is a bit tricky for bool, though. It seems that we can safely
assume `is_assignable_v<bool&, T> == is_convertible_v<T, bool>`. So the
requirement on implicit convertibility seemingly allows us to use plain
assignment to bool (together with https://eel.is/c++draft/vector.bool.pspc#2).

Reply via email to