D's limited template specialization abilities compared to C++
Timon Gehr
timon.gehr at gmx.ch
Sun May 26 15:55:58 PDT 2013
On 05/26/2013 03:04 PM, Andrej Mitrovic wrote:
> On 5/26/13, Kenji Hara <k.hara.pg at gmail.com> wrote:
>> Hmm. Currently D can specify specType for alias template parameter.
>>
>> struct X(alias int x) {} // matches only when the symbol x has the type int
>
> This feature is news to me! Pretty cool.
>
I'm about 3/4 through a D frontend implementation and was unaware of
this. :)
The reason is that the feature is undocumented. (The grammar
specification mentions the syntax, though.)
> @Philippe Sigaud: Is this mentioned in the D Template book?
>
I don't think so.
More information about the Digitalmars-d
mailing list