ef45724acd
In C++2a the remove, remove_if and unique members of std::list and std::forward_list have been changed to return the number of elements removed. This is an ABI change for the remove members and the non-template unique members, so an abi-tag is used to give those symbols new mangled names in C++2a mode. For the function templates the return type is part of the mangled name so no abi-tag is needed. * include/bits/forward_list.h (__cpp_lib_list_remove_return_type): Define. (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. (forward_list::remove, forward_list::unique): Use typedef and macro to change return type and add abi-tag for C++2a. (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use typedef to change return type for C++2a. * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro. (forward_list::remove, forward_list::remove_if<Pred>) (forward_list::unique<BinPred>): Return number of removed elements for C++2a. * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro. (list::remove, list::unique, list::remove_if<Predicate>) (list::unique<BinaryPredicate>): Return number of removed elements for C++2a. * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define. (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. (list::remove, list::unique): Use typedef and macro to change return type and add abi-tag for C++2a. (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use typedef to change return type for C++2a. * include/std/version (__cpp_lib_list_remove_return_type): Define. * testsuite/23_containers/forward_list/operations/ remove_cxx20_return.cc: New. * testsuite/23_containers/forward_list/operations/ unique_cxx20_return.cc: New. From-SVN: r262423 |
||
---|---|---|
.. | ||
config | ||
doc | ||
include | ||
libsupc++ | ||
po | ||
python | ||
scripts | ||
src | ||
testsuite | ||
acinclude.m4 | ||
aclocal.m4 | ||
ChangeLog | ||
ChangeLog-1998 | ||
ChangeLog-1999 | ||
ChangeLog-2000 | ||
ChangeLog-2001 | ||
ChangeLog-2002 | ||
ChangeLog-2003 | ||
ChangeLog-2004 | ||
ChangeLog-2005 | ||
ChangeLog-2006 | ||
ChangeLog-2007 | ||
ChangeLog-2008 | ||
ChangeLog-2009 | ||
ChangeLog-2010 | ||
ChangeLog-2011 | ||
ChangeLog-2012 | ||
ChangeLog-2013 | ||
ChangeLog-2014 | ||
ChangeLog-2015 | ||
ChangeLog-2016 | ||
ChangeLog-2017 | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.host | ||
crossconfig.m4 | ||
fragment.am | ||
linkage.m4 | ||
Makefile.am | ||
Makefile.in | ||
README |
file: libstdc++-v3/README New users may wish to point their web browsers to the file index.html in the 'doc/html' subdirectory. It contains brief building instructions and notes on how to configure the library in interesting ways.