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


On Tue, Sep 30, 2008 at 12:48 PM, Paolo Carlini
<paolo.carlini@oracle.com> wrote:
> 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.)
>
>> 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! :-)

This is purely aesthetic, but I noticed that _S_fwd_arg() in
_Result_of_util doesn't depend on the _Callee type and hence could in
theory be moved into the 2  _Result_of_impl classes which would avoid
the need for the template keyword to access it through _Result_of_util
(unless I'm missing something, I admit I haven't tried it...). A small
bit of code duplication to improve readability. Then again, often in
c++, where one sees "ugly", others see "elegance" ;). Either way.

Cheers,
Chris


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