Bug 122254 - Extend vector(InputIterator, InputIterator) handling of C++20 iterators to other members and to std::string
Summary: Extend vector(InputIterator, InputIterator) handling of C++20 iterators to ot...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 16.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-10 23:17 UTC by Jonathan Wakely
Modified: 2025-10-12 05:19 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2025-10-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wakely 2025-10-10 23:17:36 UTC
Bug 108487 optimized construction of std::vector from iterators which satisfy the std::forward_iterator concept but do not meet the Cpp17ForwardIterator requirements.

The same optimization should be applied to vector::insert and vector::assign etc.

Also std::basic_string::basic_string(InputIterator, InputIterator).

This is not required by the standard, but would be a QoI improvement.
Comment 1 Andrew Pinski 2025-10-11 20:40:59 UTC
.