Boost logo

Boost :

From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2021-03-31 13:56:12


Maybe Boost.Lambda2 could also provide its own thin wrapper for std::bind
which returns a type from namespace boost::lambda2 (for which std::
is_bind_expression
<http://en.cppreference.com/w/cpp/utility/functional/is_bind_expression><T>
::value == true). This would move the solution still further from your
ideal, but would on the other hand make a coherent solution.

Anyway, at some point you may need to add something like
`boost::lambda::constant` to handle cases like `"TIME " + time + _1`.

Regards,
&rzej;

śr., 31 mar 2021 o 15:07 Peter Dimov via Boost <boost_at_[hidden]>
napisał(a):

> 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.
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk