I'm trying to do something like this. I don't know whether or not it's a good idea, i'm open to solutions and suggestions

struct MyStruct(WEIGHTS)
{
   string ...
   string ...

   alias WEIGHTS weights;
}

double likeness(T,T1)(ref in T1, ref in T2)
{
    // Here i do some complex calculus using struct fields
    // and using weights consts
}

enum FirstWeights : double
{

}

Reply via email to