On Wednesday, 4 November 2015 at 03:55:13 UTC, Namal wrote:
Is there a way to detect overflow for example for:

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

-> 1073741824

You can use core.checkedint [1]

---

http://dlang.org/phobos/core_checkedint.html

Reply via email to