This is awesome! I added it to my D cookbook.
Thank you very much.
On 06/08/2016 10:02 AM, chmike wrote:
In a first implementation I defined a named enum in my class which I
could use with my template function foo.
final class Info {
...
enum Value { info_1 = 1, ... }
...
static bar(Value e) {...}
}
void foo(T)(T.Value e) { T.bar(e); }
In a first implementation I defined a named enum in my class
which I could use with my template function foo.
final class Info {
...
enum Value { info_1 = 1, ... }
...
static bar(Value e) {...}
}
void foo(T)(T.Value e) { T.bar(e); }
I could then write :