How to detect overflow

Namal via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 3 19:55:11 PST 2015


Is there a way to detect overflow for example for:

	int i = 2_000_000_000;
	
	int a = i*i*i;
	
	writeln(a);

-> 1073741824


More information about the Digitalmars-d-learn mailing list