[Patch] libstdc++/21244
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Apr 27 20:19:00 GMT 2005
Paolo Carlini <pcarlini@suse.de> writes:
| Gabriel Dos Reis wrote:
|
| >Naming the enumeration is not the cure. See my other message --
| >you're at the mecry of an overload (which is the key issue, actually).
| >
| >
| Ok, therefore, let's not name anything (I have to revert the fix for 21244).
|
| Then, which cure are you suggesting? Shall I add casts to an
| "appropriate" type everywhere?
adding the appropriate cast is necessary and sufficient -- as it makes
the compiler select only built-in operations even when user throws in
lot of things.
| If this is the only real solution, let's
| go with it. Probably, besides the case of cpp_type_traits, in most the
| other places int would be ok.
Interesting. When I was editing my message, I naturally put int
(instead of bool) until I realize that I really meant logical
disjunction so I reverted to bool to convey that intent. I'm not
really attached to bool, although I think it conveys the intention.
(Yes, you're right to reply that "1" should be "true" and "0" should
be "false" ;-))
| Certainly, when complex arithmetic is
| involved we are going to uglify a lot the code, sigh.
I think I do not understand this part. Could you elaborate?
-- Gaby
More information about the Libstdc++
mailing list