Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-02 14:31:09


Rob Stewart <stewart_at_[hidden]> writes:

> From: David Abrahams <dave_at_[hidden]>
>>
>> Technically one can never say "class template foo is a traits
>> template" or "class template foo is a policy" without examining how
>> it's used. There's no fundamental reason that the same class template
>> can't be used in both ways, so for any given class template, there may
>> be no either/or answer.
>
> I don't quite agree. A policy class is only that because it is a
> template parameter.

A class is never a template parameter. It can be a template argument.

> Whether a class that is passed as a policy
> to some template happens to be a traits class is immaterial. So,
> in the context of the template,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Exactly. How it's used.

> the template parameter is a policy class and that may correspond to
> a traits class in a particular specialization, but that doesn't make
> the traits class a policy class. Does that make sense?

Not much, to me. I think you're trying to say the same thing I said,
but in a more contorted way.

-- 
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