Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-02-14 15:58:12


On 2/14/06, Felipe Magno de Almeida <felipe.m.almeida_at_[hidden]> wrote:
> 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?

Sorry!
It does support template template parameters. All that is needed is
wrap the template template parameter in a type:

struct tag {};
template <template<typename> class T>
class wrap
{
  template <typename ApplyT>
  struct apply
  {
    typedef T<ApplyT> type;
  };
};

template <template<typename> class T>
struct a0_is : parameter::template_keyword<tag, wrap<T> >
{};

And just use the tag again in the parameter:parameters.

It would be a very addition to a "tips section" in the documentation.

[snip]

--
Felipe Magno de Almeida

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