On Saturday, 13 September 2014 at 11:34:01 UTC, Marc Schütz wrote:
Consider the following code:
alias Sink = scope void delegate(const(char)[]);
private template generateAliases(int __i, __vars...) {
import std.conv : to;
static if(__i < __vars.length)
On Sunday, 14 September 2014 at 09:29:16 UTC, Kagamin wrote:
Doesn't this cause infinite recursion?
No, because the inner templates are instantiated with different
first template parameters. Even if all template parameters were
the same, it would only be a runtime recursion.
Doesn't this cause infinite recursion?
Consider the following code:
alias Sink = scope void delegate(const(char)[]);
private template generateAliases(int __i, __vars...) {
import std.conv : to;
static if(__i < __vars.length)
enum generateAliases = "alias " ~
__vars[__i].stringof ~ " =