www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dtl - complex template?

reply "Ivan Senji" <ivan.senji public.srce.hr> writes:
I understand(or accept)  the reasons why having a built in
complex type in the language is better but there are times
when someone will need
Complex!(Int) or Complex!(BigRational) and a general
complex template should be in the standard library,
it doesn't make sence that everyone write's his own version.
Jun 01 2004
parent reply Ben Hinkle <bhinkle4 juno.com> writes:
Ivan Senji wrote:

 I understand(or accept)  the reasons why having a built in
 complex type in the language is better but there are times
 when someone will need
 Complex!(Int) or Complex!(BigRational) and a general
 complex template should be in the standard library,
 it doesn't make sence that everyone write's his own version.
That would be nice. Also a Rational!(int), Rational!(long), Rational!(Int) template would also be nice. I haven't looked at BigRational - does it use a template?
Jun 01 2004
parent Daniel Horn <hellcatv hotmail.com> writes:
BigRational does use a template :-) and it is a struct

and I have tested it woth long and Int (biginteger)
Ben Hinkle wrote:
 Ivan Senji wrote:
 
 
I understand(or accept)  the reasons why having a built in
complex type in the language is better but there are times
when someone will need
Complex!(Int) or Complex!(BigRational) and a general
complex template should be in the standard library,
it doesn't make sence that everyone write's his own version.
That would be nice. Also a Rational!(int), Rational!(long), Rational!(Int) template would also be nice. I haven't looked at BigRational - does it use a template?
Jun 01 2004