
11 Oct
2009
11 Oct
'09
5:28 a.m.
It may be that being able to examine the return type -- we never did anything to make that work, did we? -- of the various operators would leave the answer to that question to the caller. For example, if < returns void, but > returns something convertible to bool, generic code could use > instead of < for sorting. (Far fetched, to be sure, but the idea, in general, seems reasonable.)
We had a bit of discussion before that thread and never achieved to get the exact result type of an operator. The only thing we could do is know if the result type is convertible to something. If somebody has a code to get the result type of some function, it would be very interesting to add that traits alone... Frédéric