Opened 10 years ago

Closed 10 years ago

#6914 closed Feature Requests (fixed)

[Lambda] Add result_of and tr1_result_of specializations for nullary function calls

Reported by: Michel Morin Owned by: No-Maintainer
Milestone: To Be Determined Component: lambda
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

To support nullary-callable polymorphic function objects in C++03 result_of, we have to specialize result_of and tr1_result_of for the zero-argument case. (If we don't provide specializations, the type determined by C++03 result_of for zero-argument function calls is defaulted to void. See the rationale in N1454.)

For example, phoenix/core/actor.hpp has such specializations. (Note that its current implementation is not perfect: #6911.)

Change History (3)

comment:1 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: newclosed

(In [82935]) Handle nullary result_of. Fixes #6914.

comment:2 by Michel Morin, 10 years ago

Resolution: fixed
Status: closedreopened

Thanks for the fix, Steven.

I think we need to add the specialization for const functors, too.

comment:3 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: reopenedclosed

(In [83020]) Handle const lambda functors for nullary result_of. Fixes #6914.

Note: See TracTickets for help on using tickets.