Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-12-31 23:21:55

----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>

> That doesn't do anything to reduce the confusability of the 'typename'
> keyword for me, especially not in Jaap's example:
> template<
> typename T
> , typename T::X N
> >
> class foo;

No problem. Scope resolution == not a template type declaration. Simple.

> > In short, my motivation for using 'typename's here is that I perceive
> > 'class' keyword as rather high-weight, semantically loaded, and prefer
> > use it in its only original context - that is, for declaring/defining a
> > user-defined type that is more than a POD. Using it in other places
> > the word.
> As I said (and no offense is intended) these seem to be pedantic
> rather than practical reasons. I suppose you could say "aesthetic"
> instead of "pedantic", but the practical consequences of those choices
> outweigh the aesthetic ones for me, especially because in a
> metaprogramming context we will commonly use "struct" instead of
> "class"... once again because the practical consequences outweigh the
> aesthetic ones ;-)

And "struct" isn't the half of it. You can basically lump all
metaprogramming into the category of "not the original intent." That
includes inheritance, overloading, etc., etc... Once you start doing heavy
metaprogramming the aesthetic ideal starts to lose its shine.

Paul Mensonides

Boost list run by bdawes at, gregod at, cpdaniel at, john at