Title
The helper lambda of std::erase for hive should specify return type as bool
Status
wp
Section
[hive.erasure]
Submitter
Hewill Kang

Created on 2025-03-24.00:00:00 last changed 6 days ago

Messages

Date: 2025-06-23.16:37:24

Proposed resolution:

This wording is relative to N5008.

  1. Modify [hive.erasure] as indicated:

    template<class T, class Allocator, class U = T>
      typename hive<T, Allocator>::size_type
        erase(hive<T, Allocator>& c, const U& value);
    

    -1- Effects: Equivalent to:

    return erase_if(c, [&](const auto& elem) -> bool { return elem == value; });
    
Date: 2025-06-23.16:37:24

[ Sofia 2025-06-21; Status changed: Voting → WP. ]

Date: 2025-06-15.00:00:00

[ 2025-06-12; Reflector poll ]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

Date: 2025-03-24.00:00:00

This is a follow up to LWG 4135, which incidentally adds a default template parameter for U to be consistent with other erase functions, which is editorial since the declaration already has it.

History
Date User Action Args
2025-06-23 16:37:24adminsetmessages: + msg14858
2025-06-23 16:37:24adminsetstatus: voting -> wp
2025-06-12 20:59:27adminsetstatus: ready -> voting
2025-06-12 20:55:03adminsetmessages: + msg14800
2025-06-12 20:55:03adminsetstatus: new -> ready
2025-03-27 17:14:54adminsetmessages: + msg14704
2025-03-24 00:00:00admincreate