Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-09-16 06:01:55

>Template templates are never really needed, since they
can be replaced by using partial specialization. Instead
of having two versions of the code, one with template templates
and one with the partial spec. version, I think its better
to just maintain the one version that is more portable,
the partial spec. version. Also, the partial spec can
be replaced with something even more portable, but that
starts to get really messy...

There is another option given in the "generative programming" book:
Use a nested template:

instead of:

template <class T, template<class U> class TT>
struct foo
        typedef TT<T> bound_type;

template <class T, class Config>
struct foo
        typedef Config::template Bind<T> bound_type;

However I am not necessarily against a #define in config.hpp

- John.

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