31 Mar
2021
31 Mar
'21
1:06 p.m.
Alexander Grund wrote:
So yes, I think the only realistic way forward given the lookup issue is for Lambda2 to define its own placeholders in the same namespace as the operators. Then you likely need to wrap the bind-expressions too, don't you? E.g. when `_1 + 1` works by using lamda2::_1, then you'll have the same issue for `(_1 + 1) + 1`
It should work. The result of std::bind will encode in its type somewhere the type of _1, which will make boost::lambda2 an associated namespace. std::bind(f, 1) + 2 will not be associated, so it will have the problem in Barry's scenario, but there's nothing we can do about it.