May 09, 2013 Re: Template alias parameter does not accept types | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | Feels like I am the only one who wants to restrict rules, not relax them =/ But, erm, you don't need alias accepting literals for old syntax! Strings are valid as template value parameters: http://dpaste.1azy.net/54e5d3f2 |
May 09, 2013 Re: Template alias parameter does not accept types | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Thu, 09 May 2013 10:00:45 -0400, Dicebot <m.strashun@gmail.com> wrote:
> Feels like I am the only one who wants to restrict rules, not relax them =/
>
> But, erm, you don't need alias accepting literals for old syntax! Strings are valid as template value parameters: http://dpaste.1azy.net/54e5d3f2
Hm.. maybe it was a bug that turned into a feature :) Perhaps I'm not remembering correctly why this was introduced.
It is true that you could simply accept a literal with an int/long or string, and then you can have different template instantiations based on that.
-Steve
|
Copyright © 1999-2021 by the D Language Foundation