From: David Abrahams (dave_at_[hidden])
Date: 2005-10-11 17:22:28
Simon Buchan <simon_at_[hidden]> writes:
>> Nope, wrong again. If ar's type X is dependent and "register_type" is a
>> nested template in X, then you need "ar.template register_type<...>".
>> Otherwise, you need "ar.register_type<...>"
> A-la typename usage:
> typename dependant_name::nested_type
> dependant_name.template nested_template
>>>From the above code it could be either. Its really annoying to me
>>>to have to keep the context and provinence of a variable like "ar"
>>>in my head while I'm writting.
>> Guess what; you don't. If you had to know whether ar was a template
>> or not, just think how impossible it would be to write generic code?
> Well, you *do* have to know if ar is a class template, but not if it's a
> template class, which is what I think you were trying to say.
No, I was using colloquialism. After all, "ar" is a variable, not a
type or a template. The only interpretation that could possibly make
sense is that I meant "ar's type is a class template specialization."
-- 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