[Issue 8143] Safe std.conv.to enum conversion

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 24 10:28:52 PDT 2012


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



--- Comment #8 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-24 10:28:51 PDT ---
(In reply to comment #6)
> (In reply to comment #4)
> 
> > I think customization like
> > this might be friendlier than just rejecting conversion.
> 
> It also makes the implementation and usage a bit more complex. Ask to other
> people (like Andrei) to see what they think. (Here my preference goes to a
> simple solution).

It's only complex for the case of floating point conversion. We could by
default set the alias to be a safe floating-point comparison function by
default so the user doesn't have to pass one if he doesn't want to.

There are other to!() implementations that take special arguments, e.g. in
radix conversions an extra argument is passed.

-- 
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