[Patch] Prefer plain operator== to traits::eq in num_get

Paolo Carlini pcarlini@suse.de
Fri Mar 5 19:28:00 GMT 2004


Hi,

Nathan suggested this work during the recent exchange with Martin.
Indeed, I'm convinced that this is the way to go.

Besides, as a matter of fact:
1- We are already (inconsistently) using operator== in money_get.
2- In the standard, 22.2.2.1.2, p8, the comparisons are explicitly
   carried out via operator==, *not* traits::eq.

Thus, the below. The only, very minor IMO, catch, is that operator== has
to be added to 'pod_char' and 'character' in the testsuite, otherwise,
some instantiations fail: the equalitycomparable requirement seems natural
and a third (*) char-like class dseigned by Gaby already has operator==.

Tested x86-linux, please speak soon, in case! ;)

Paolo.

///////////////

(*) Yes, ASAP, I'd like to clean up a bit the tangle of char-like
classes we have in the testsuite ;)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_cu_eq_2
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040305/9ee02929/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_cu_eq_2
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040305/9ee02929/attachment-0001.ksh>


More information about the Libstdc++ mailing list