
[I've sent the reply below yesterday, but for some reason it didn't go through] Daniel Wallin writes:
Well OK, let's do that. What are your thoughts about adding something like this?
template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct unlambda { template< typename X = na BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename X, na) > struct apply { typedef T type; };
typedef unlambda type; };
...
/// special case for 'unlambda' template< typename T, typename Tag > struct lambda< mpl::unlambda<T>,Tag, int_<1> > { typedef true_ is_le; typedef mpl::bind0<mpl::unlambda<T> > result_; typedef result_ type; };
While straightforward, a primitive like 'unlambda' won't cover many use cases that I consider important. I'd be inclined towards more systematic approach to nested scoping, something along the lines of what is discussed in the attached conversation (long, but insightful). May be even implicit scoping for the library algorithms as described in one of these emails. Thoughts are welcome. -- Aleksey Gurtovoy MetaCommunications Engineering