This is the mail archive of the
mailing list for the libstdc++ project.
Re: Make associative container operators inline friend
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 3 Oct 2018 11:08:59 +0100
- Subject: Re: Make associative container operators inline friend
- References: <firstname.lastname@example.org> <20180928115108.GJ23172@redhat.com> <email@example.com>
I consider the Table 83 - Container requirements where it is only
saying that a == b should be well defined without namespace
consideration. But I won't argue on Standard details with you, I'll
revert that part.
The table says what they mean, but the synopses for <map> and <set>
also show declarations for those operators at namespace scope.
As far as I can tell, we only every use __x._M_t < __y._M_t and
__x._M_t == __y._M_t, so don't need anything else.
For sure we don't use those for associative containers operators. I
guess they have been added for consistency with Standard containers.
There are here for a long time, do you want to remove them now ? I can
add this cleanup in my patch if you want.
Maybe we should deprecate them first. So please make them inline
friends (as for == and <) and add __attribute__((__deprecated__)).
I'll add something to the release notes for gcc-9 saying they're
deprecated. If nobody complains we can remove them for gcc-10 or