
10 Apr
2008
10 Apr
'08
1:26 a.m.
Eric Niebler:
Peter Dimov wrote:
Eric Niebler:
I'm glad we know how to write the identity function object in C++0x. What about in C++03?
I'd put the C++03 overloads in an #else block; apart from that, this identity function object is correct.
OK, thanks. Just for my own understanding, leaving the C++03 overloads in -- as well as the nested result<> template -- doesn't make it wrong, correct? Just not minimal.
Doesn't the Arg& overload lead to an ambiguity? The Arg const& overload looks harmless. I don't have an && compiler handy at the moment to check it though. :-)