Virtual value types during compile-time for static type safety, static optimizations and function overloading.

Tamas via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 18 03:17:30 PDT 2015


Sorry, the main function of positive0.d correctly looks like this:

int main() {
   return !((abs(-16) == 16)
     && (abs(3) == 3)
     && (square(5).absPositive == 25)
     && (square(-4).absPositive == 16));
}

But this does not affect the results, the asm file sizs or the 
asm abs function bodies.




More information about the Digitalmars-d-learn mailing list