On Friday, 29 July 2016 at 20:13:34 UTC, stunaep wrote:
I have some java code I need to convert and at one point it uses an Object[] array to store various ints, longs, and strings. Java has built in Integer and Long classes that wrap the primitives in an object and strings are already objects.

No, but with a template you could easily make your own:

class Boxed(T) {
        T _v;
        alias _v this;
        this(in T v) immutable {_v = v;};
};

auto i = new Boxed!int(6);

Reply via email to