
5 Aug
2005
5 Aug
'05
1:44 p.m.
Howard Hinnant <hinnant@twcny.rr.com> writes:
On Aug 3, 2005, at 6:21 PM, David Abrahams wrote:
Is it really true that I can write
bind(f, _1) > _2
but can't write
_1 > _2
??
I can't imagine a good reason for that restriction, but I don't see any indication that the latter is supported in the docs.
That is a really interesting suggestion, and significantly blurs the line between bind and lambda.
Once you have:
_1 > _2
then
_1 > literal
will pretty much come in for free (I think).
And if you construct the types of _1 and bind(...) smartly, you get all the operators on placeholders for free, too. As in MPL, _N would be a bind_t specialization that returns its Nth argument. -- Dave Abrahams Boost Consulting www.boost-consulting.com