Boost logo

Boost :

From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2008-03-28 18:13:30


On Fri, Mar 28, 2008 at 9:56 PM, Eric Niebler <eric_at_[hidden]> wrote:
> David Abrahams wrote:
> > To start with, there's one very basic thing we won't be able to do: name
> > template specializations that cannot be instantiated, like
> >
> > vector<foo(bar)>
> >
> > just for DSEL purposes.
>
> Ugh! I suppose this would work around the issue:
>
> vector<call<foo(bar)>>
>
> as long as call<> happened to be Regular.
>

What about

template<class Wrapped<typename T...>, typename ArgList... >
class bind;

bind<vector, foo(bar(_1)), _2>

That should work, even if 'Wrapped' requires it template arguments to
conform to some exotic concept.
Or may be something like this:

bind<vector>(foo(bar(_1)), _2)

Untested of course, and I'm not sure how concepts interact with
template template parameters.

-- 
gpd

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