
On Wed, Apr 2, 2008 at 6:01 PM, shunsuke <pstade.mb@gmail.com> wrote:
Giovanni Piero Deretta wrote:
BTW, everything must be function-call to support result_of.
What do you mean exactly with "everything must be function call?".
result_of<T_lambda(T1)>::type r = lambda(t1); // ok, result_of compatible.
This wouldn't compile in my model, you can't call 'lambda' using operator() (well, I plan to support scoped variables a-la phoenix one day, but for the moment it simply doens't compile).
??? r = lambda[t1];
result_of<T_lambda(T1)>::type r = lambda[t1] might work just fine, but maybe overloading result_of is not nice. What about: protected<t1> r = lambda[t1]
[...]
I tend to hesitate to use result_of/return_of without function-calls.
Again, what do you mean exactly? And why do you esistate? I'm evaluating egg design, so these answers would be very valuable.
E.g. result_of<F(T1)>::type s;
result_of is a trait which extracts return type of function-calls, but s is default-constructed without function-calls.
Well, what is the problem? As long as there is no bind-like function in there which requires passing closure parameters, it should be fine. I agree that it might be confusing initially. -- gpd