Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2001-11-26 23:51:20

David A. Greene wrote:

> The question I always ask when facing these sort of issues is: what
> is the purpose of the thing I'm defining? The name should reflect
> that. Now, I'm just starting out learning about template
> metaprogramming, but from Andrei's book it looks like a common
> use is to enable convenient overloading/specialization. Perhaps
> the name should reflect that. Of course other uses should be
> considered as well.

After continuing in the thread and seeing the other uses of

int_t<N>, it strikes me that it's quite overloaded. One
of these is unique_type<N>. Another is int_value<N>.
type2type<T> can maybe be called type_wrapper<T> or even
degenerate_typedef<T> in some cases. :)

Does it at all make sense to provide "naming" subclasses so
that programmers can name the thing based on its use context?
I'm thinking something along the lines of:

template<int N>
class int_value : public int_t<N> {};

etc. Maybe it isn't practical -- just a thought I had.


"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

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