This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 11/26/18 6:18 AM, Jonathan Wakely wrote:
Is *this* what you has in mind for this? I basically return the number of erased items for all the things.On 24/11/18 13:54 -0500, Ed Smith-Rowland wrote:All,I's very late but uniform container erasure is, I think, the last little tidbit to graduate from fundamentals/v2 to std at the last meeting. I think it would be a shame not to nudge this into gcc-9. The routines are very short so I just copied them. Ditto the testcases (with adjustments). The node erasure tool was moved from experimental to std/bits and adjustments made to affected *set/*map headers.The experimental code has been in our tree since 2015. This builds and tests clean on x86_64-linux.OK for trunk as it only touches experimental C++2a and TS material. Thanks. I pointed out to the committee that the erase_if functions added to C++20 completely overlook P0646R1 "Improving the Return Value of Erase-Like Algorithms" and so fail to preserve the useful information returned by the members of the linked list containers.
I expect that to get fixed as a defect. If you have time and motivation, I think we should make that change proactively in libstdc++. The Library Fundamentals versions can continue to return void, but the ones in namespace std can return the number of elements removed
Ed
Attachment:
CL_num_erased
Description: Text document
Attachment:
patch_num_erased
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |