
7 Apr
2008
7 Apr
'08
5:06 p.m.
Eric Niebler:
Peter Dimov wrote:
Eric Niebler:
// lvalue result_of<identity(int &)>::type l = identity()(i); assert( &l == &i );
Does this really compile for you?
Yes.
...
template<typename Arg> Arg &operator()(Arg &arg) const { return arg; }
With this addition it does. I overlooked the
// and a non-const overload, too
part in your original. I'm becoming too compiler-like.