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


Jonathan M Davis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #5 from Jonathan M Davis <[email protected]> 2013-01-09 03:32:01 
PST ---
std.traits is purposefully _not_ taking implict conversion into account (doing
otherwise would cause havoc with template constraints), and isIntegral
specifically says "Detect whether $(D T) is a built-in integral type." And it's
not like isIntegral could be made to work for user-defined types, as integral
types don't have an API specific to themselves. The trait has to know all of
the types that count as being integral types.

To do the conversion that you're looking for, just convert to uint first:

    auto f = to!(Nullable!uint)(to!uint("12"));

or

    auto f = Nullable!uint(to!uint("12"));

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

Reply via email to