Generic comparison
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Nov 10 16:55:11 UTC 2020
I want to implement a generic function for "a < f(x) < b" that
will give the same result as "(a < f(x)) && (f(x) < b)" for any
conceivable mix of types. Except if that "f(x)" should only be
evaluated once.
Is it sufficient to use "scope ref" in parameters?
I don't want to assume _anything_ about the definition of the
types and the implementation of the comparison operator (can be
overloaded).
More information about the Digitalmars-d-learn
mailing list