[cfe-dev] template typedef

Douglas Gregor dgregor at apple.com
Tue Mar 16 14:22:25 PDT 2010


On Mar 16, 2010, at 2:10 PM, Jochen Wilhelmy wrote:

> Hi!
> 
> would it be possible to add a non-standard extension for template typedefs?
> 
> e.g.
> template <typename Type>
> 
> typedef Type __attribute__((ext_vector_type(4))) Vector4;
> 
> 
> Vector4<float> myFloatVector;
> 
> 
> or other example:
> 
> template <typename Type>
> typedef std::map MyMap;
> 
> MyMap<int> myMap;

We would not accept such an extension into mainline. C++0x has template aliases, which serve the same purpose but have not yet been implemented. See, e.g.,

	http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf

And the most recent C++0x working paper.

	- Doug



More information about the cfe-dev mailing list