On Saturday, 20 August 2016 at 06:28:47 UTC, Enamex wrote:
On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine
wrote:
I am trying to get Timon Gehr's code working, with some
modifications:
void main()
{
import std.traits;
auto a = new Type!("Animal", "Dog", "Pug")();
On Saturday, 20 August 2016 at 09:42:08 UTC, Jack Applegame wrote:
On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine
wrote:
Any ideas?
Something like this?
mixin template TypeData(string type: "Animal") {
int y;
}
mixin template TypeData(string type: "Dog") {
int z;
}
mixin t
On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine wrote:
Any ideas?
Something like this?
mixin template TypeData(string type: "Animal") {
int y;
}
mixin template TypeData(string type: "Dog") {
int z;
}
mixin template TypeData(string type: "Pug") {
int s;
}
template Type(s
On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine wrote:
I am trying to get Timon Gehr's code working, with some
modifications:
void main()
{
import std.traits;
auto a = new Type!("Animal", "Dog", "Pug")();
Type!("Animal", "Dog") b = a;
Type!("
I am trying to get Timon Gehr's code working, with some
modifications:
public template TypeParent(P)
{
import std.traits;
alias T = TemplateArgsOf!P;
alias Seq(T...) = T;
static if (T.length == 0 || is(typeof(T[0]) == typeof(null)))
{