template typedef

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Dec 16 15:02:00 GMT 2005


Vincent Torri <Vincent.Torri@iecn.u-nancy.fr> writes:

| Hey, thanks for the (2) answer(s)
| 
| ok, so its uses is a bit less obvious. You use the fact that classes can
| be "templated" and that they can contain typedef.

Hi Vincent,

  Formally, there is no template typedef in current C++.  You can
-emulate- it with the syntax Eljay suggested.  For C++0x, there will
be a way to do that, through what we call "template alias"

   template<typename T>
     using Registery = std::mapt<std::string, T>;

but that is not yet implemented in g++.

-- Gaby



More information about the Gcc-help mailing list