P0646R1 for Debug mode

François Dumont frs.dumont@gmail.com
Mon Aug 20 20:26:00 GMT 2018


This patch implements P0646R1 for Debug mode containers.

It fixes tests:

23_containers/forward_list/operations/remove_cxx20_return.cc
23_containers/forward_list/operations/unique_cxx20_return.cc
23_containers/list/operations/remove_cxx20_return.cc
23_containers/list/operations/unique_cxx20_return.cc

Note that it also adopt the Lib Defects 526 which had been implemented 
only for the normal mode.

I'll commit this tomorrow if not told otherwise.

     P0646R1 Improving the Return Value of Erase-Like Algorithms I
     * include/debug/forward_list (forward_list::__remove_return_type):
     Define typedef as size_type or void, according to __cplusplus value.
     (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
     empty, according to __cplusplus value.
     (_GLIBCXX20_ONLY): Define macro.
     (forward_list::remove, forward_list::unique): Use typedef and macro
     to change return type and add abi-tag for C++2a. Return number of
     removed elements for C++2a.
     (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
     typedef to change return type for C++2a. Return number of removed
     elements for C++2a.
     * include/debug/list (list::__remove_return_type): Define typedef as
     size_type or void, according to __cplusplus value.
     (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
     empty, according to __cplusplus value.
     (_GLIBCXX20_ONLY): Define macro.
     (list::remove, list::unique): Use typedef and macro to change return
     type and add abi-tag for C++2a. Return number of removed elements for
     C++2a.
     (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use 
typedef
     to change return type for C++2a. Return number of removed elements for
     C++2a.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_remove_unique.patch
Type: text/x-patch
Size: 8148 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180820/6e3eb72b/attachment.bin>


More information about the Libstdc++ mailing list