r280067 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Thu Jan 9 21:31:00 GMT 2020


Author: redi
Date: Thu Jan  9 21:31:55 2020
New Revision: 280067

URL: https://gcc.gnu.org/viewcvs?rev=280067&root=gcc&view=rev
Log:
libstdc++: Fix <ext/pointer.h> incompatibilities with C++20

The equality operators for _ExtPtr_allocator are defined as non-const
member functions, which causes ambiguities in C++20 due to the
synthesized operator!= candidates. They should always have been const.

The _Pointer_adapter class template has both value_type and element_type
members, which makes readable_traits<_Pointer_adapter<T>> ambiguous. The
intended workaround is to add a specialization of readable_traits.

	* include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
	(_ExtPtr_allocator::operator!=): Add missing const qualifiers.
	* include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
	partial specialization to disambiguate the two constrained
	specializations.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/ext/extptr_allocator.h
    trunk/libstdc++-v3/include/ext/pointer.h



More information about the Libstdc++-cvs mailing list