P0646R1 for Debug mode

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


Right after I hit the send button I realized that I had forgotten to 
remove the definition of __cpp_lib_list_remove_return_type on the Debug 
forward_list side.

I haven't plan to define this macro in this context, I prefer to leave 
it to normal implementation.

So here is the updated patch.


On 20/08/2018 22:26, François Dumont wrote:
> 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: 8095 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180820/a51c8a77/attachment.bin>


More information about the Libstdc++ mailing list