
On Jan 6, 2007, at 9:54 AM, Peter Dimov wrote:
Yuval Ronen wrote:
Wouldn't the result_of library be completely useless once typeof and other stuff like that be introduced into the language? Is the result_of library just a temporary patch accepted to tr1 only until C++0x?
It would be nice if the answers to these questions turn out to be yes and yes, in no particular order. But there are indications that decltype won't be quite what it needs to be in order to render result_of useless. We'll have to wait and see.
The intent was "yes" and "yes", but in the end we found that result_of still has some notational advantages over decltype in many cases. If anything is going to make result_of useless, it would be the introduction of the "Callable" concept, which gives the same information in addition to type-safety guarantees. If decltype does not end up with the right semantics to make implementing result_of trivial, I suspect it will be over the dead bodies of the majority of the Library Working Group. The reason we have "decltype" and not "typeof" is because someone wanted typeof to strip references... Cheers, Doug