[Issue 9112] Uniform construction for built-in types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 7 10:41:13 PST 2012


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



--- Comment #12 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-12-07 10:41:09 PST ---
(In reply to comment #9)
> (In reply to comment #1)
> > This is useful in generic code:
> > int n = int(10);
> 
> EXTREMELY useful. Just the other day, I was writing a unittest to cover
> appender with as many types as possible, and wanted to write something along
> the lines of:
>             app1.put(S(i)); // HERE

There:
              app1.put(DefInit!S(i));

No need to introduce new syntax because of a small issue like that.

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