[Issue 10909] std.conv.to!(bool)(int): conversion from integer to bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 26 23:10:16 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10909


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #1 from monarchdodra at gmail.com 2013-08-26 23:10:15 PDT ---
The current semantics of "to!X" means that there is range validation. This
means that something such as:

"to!bool(55)" *should* trigger an overflow exception.

This might sound inconvenient at first, but on the other hand, if it didn't,
than to would just be a glorified cast to bool.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list