[Issue 5347] Add constructors for primitive types to make pointers easier to use

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 13 02:47:20 PST 2010


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



--- Comment #3 from yebblies <yebblies at gmail.com> 2010-12-13 02:45:34 PST ---
(In reply to comment #2)

I agree it would be more consistent that way, for value types.

void f(T)(T v)
{
   auto x = new T(v); // what if T is a class, array, static array etc?
}

A search of my own code doesn't come up with any instances of allocating a
single value type like this.
Searching phobos gives two instances, both in unittests.

If it's not used very often, what's the point of adding syntax for it?

Just saying.

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