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