The following works: enum foo(int x) = x + foo!(x - 1); enum foo(int x : 0) = 0;
enum bar(T) = cast(T) 3; enum bar(T : int) = 4;Wrap it in a unittest{}, and complaints about multiply defined templates hit. Is there a reason for this?
Jeffrey Tsang via Digitalmars-d Mon, 08 Jun 2015 11:16:10 -0700
The following works: enum foo(int x) = x + foo!(x - 1); enum foo(int x : 0) = 0;
enum bar(T) = cast(T) 3; enum bar(T : int) = 4;Wrap it in a unittest{}, and complaints about multiply defined templates hit. Is there a reason for this?