|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-02-14 15:40:05
Felipe Magno de Almeida <felipe.m.almeida_at_[hidden]> writes:
> Hi,
>
> I'm adventuring through the named template parameter support in the
> parameter library, using the test ntp.cpp as a documentation.
> But, AFAICS, there's no support for named template template
> parameters, is that right?
>
> Couldnt it be possible to add such feature?
> I think it is possible if we use a different binding and an
> template_template_keyword (or with another name) ?
The problem is that they can't be mixed with other template parameter
kinds, so it's really hard (i.e. impossible) to get order independence
unless you have a bunch of adjacent named TTPs. I suggest you first
consider asking users to pass MPL lambda expressions instead:
with_ntp<
container_is<std::vector<mpl::_> >,
...
>
That will deal with the problem with default arguments to class
templates along the way (std::vector takes 2).
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk