This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++0x] result_of


Hi Jonathan,

and sorry about the delay, wanted to review some background material before answering...

On Sep 19, 2008, at 12:36 AM, Jonathan Wakely wrote:

2) According to TR1 all function objects defined by the standard
library must give the right answer with tr1::result_of. Making that
work might require a result_type typedef or a result_of partial
specialisation to be added to some components outside the tr1 dir e.g.
std::default_delete (or tr1::result_of could use decltype too.)

To be clear, the usual policy: we want the TR1 facilities to be essentially frozen. Certainly we don't want to update / extend the TR1 facilities to deal "correctly" with newer components, objects, etc, specified in the C++0x draft. TR1 must be consistent with C++03 and only with C++03. For the C++0x facilities we can afford to take (limited ;) risks, consistently with the experimental nature of the C+ +0x switch itself. That said, I always suggest proceeding in a stepwise way as much as possible: in a first installment of new facilities better not covering some special cases in new clauses and play safe with the rest of the library.


This probably isn't ready to go in, but here's a patch for discussion.
If I've missed an obvious way to do it better please point it out! :-)

I think the patch is Ok as-is to close the PR. But please, try to follow the iter of the issues which you posted on the reflector and the following resolutions: eventually we don't want #if 0 blocks in the code delivered as part of gcc4.4.0, much better making a well thought choice and in a comment providing pointers to people willing to further investigate the options. Even more so for C++0x material.


Thanks again,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]