[Bug libstdc++/122313] std::vector<T>::insert(const_iterator, InputIt, InputIt) should allow *InputIt with convertible type
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 18 11:29:04 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122313
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Then I think the standard should clarify what Cpp17EmplaceConstructible means
for vector<bool>. Just saying it doesn't use allocator_traits::construct makes
Cpp17EmplaceConstructible completely vacuous for vector<bool>. Does bool even
have to be constructible from args if we just say it doesn't use
allocator_traits::construct?
Maybe we should say that it uses
allocator_traits<std::allocator<bool>>::construct instead of
allocator_traits<allocator_type>::construct. That would be equivalent to
std::construct_at, which will value-init a bool from the args.
That would make it clear that comment 8 should work, because the explicit
conversion would be used, not the deleted one.
I'll open an issue.
More information about the Gcc-bugs
mailing list