|
Boost : |
From: Gary Powell (powellg_at_[hidden])
Date: 2002-02-19 14:13:44
>>---------------------------------
If the return expression includes anything else, including more than one
auto variables, it could involve an implicit conversion.
template<typename A, typename B>
auto operator+(A a, B b)
{
return a + b; // posible implicit conversion here.
}
<<--------------------------------------------------
Yes!
And we don't know what that conversion is! And we can't ask the
compiler to tell us. Instead in LL, we had to do pages of
type deduction code that "knows" what the conversions are. And
if you are using a user defined class that has overloaded
operator +() you have to tell us what the return type is. Its
arcane, and the compiler does know it. But we can't find out.
And we don't really care what it is, other than to pass it
along to the calling function.
You wouldn't believe what a killer issue this is until you
try it. (Jeremy S. knows that's for sure, as does Peter D.)
-Gary-
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk