Boost logo

Boost Users :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-09-13 15:55:46


"Peter Dimov" <pdimov_at_[hidden]> wrote

>> Just an idea -- is it possible to have one universal set of
>> placeholders in boost? Bind, Lambda, MPL, and possibly other
>> libraries could then use some sort of redirection to their
>> specialized placeholders... Might help to avoid some confusion.
>
> This isn't possible in general

Not sure I understand why...

AFAIU, placeholders are either types (MPL), in which case some sort of
traits can be used to redirect from, say, boost::_1 to mpl::_1, or const
objects (Bind, Lambda), in which case some extra indirection through
overload could possibly do the trick something like:

template<class T> T redirect(const T&);
template<int n> bind::arg<n> redirect(const boost::arg<n>&);

Regards,
Arkadiy

 


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net