Converting a number to complex

Frederik Vagner vnataneg.jykhan at gmail.com
Thu Nov 22 07:47:10 PST 2012


I am trying to make a templated class to accept any numeric type:

class example(Type) if (isNumeric(Type))
{
     Type k = to!Type(1);
     ....
}

however I always get a compiler erro stating I cannot make that 
conversion. How do I fix it?


More information about the Digitalmars-d-learn mailing list