[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coding Convention
Bjarke Hammersholt Roune wrote:
>I think we need to get a more precise wording on when its ok to use
>templates, and what kind of templates its ok to use.
>
>Class-member-templates are not supported by MS VC++ 5.0 (they they are in
>version 6.0). But all other template-types are, except for template
>specialization (atleast, I haven't got it to work).
>
>It's my impressions that function templates are the most supported template
>type, followed by class templates. I think we should either agree on using
>these whenever its a good idea. However, other template types might be
>another matter.
>
>In any case, I think we should agree on what we are going to use, and what
>we are not going to use. If just one guy uses a certain feature, a person
>with a compiler without this feature will not be able to compile PenguinPlay
>as a whole. This means that if just one guy uses a certain feature, we might
>just as well all use it, as it won't make a difference compiler
>compatibility-wise.
I had some problems with g++ and templates, because it doesn't support the
"export" keyword neccessary to use templated that were defined in another
compilation unit. Looking at your code the situation seems to be similar
with VC++ (you have the complete implementation of the templates in the
header file).
What about "Use of function and class templates allowed, but only when
completely implemented in the respective header (no use of the "export"
keyword). Sparse (expr?) use recommended however." ?
Christian
--
Drive A: not responding...Formatting C: instead