This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make associative container operators inline friend

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]