On Monday, 8 July 2013 at 15:43:21 UTC, Marco Leise wrote:
Am Thu, 04 Jul 2013 15:54:48 +0200
schrieb "monarch_dodra" :
> This should work:
>
> int[] *pSlice = (new int[][1]).ptr;
>
> -Steve
Hum... That would allocate a dynamic array of slices though
right? There'd be the Appendable overhead
Am Thu, 04 Jul 2013 15:54:48 +0200
schrieb "monarch_dodra" :
> > This should work:
> >
> > int[] *pSlice = (new int[][1]).ptr;
> >
> > -Steve
>
> Hum... That would allocate a dynamic array of slices though
> right? There'd be the Appendable overhead for just one element...
No, it allocates a st
On Thursday, July 04, 2013 09:37:57 Steven Schveighoffer wrote:
> On Thu, 04 Jul 2013 08:02:13 -0400, monarch_dodra
>
> wrote:
> > This is a pretty stupid question, but how would you allocate an "int[]"
> > on the heap? I'm not talking about the array, but the actual slice
> > object. EG:
> >
>
On Thursday, 4 July 2013 at 13:37:52 UTC, Steven Schveighoffer
wrote:
On Thu, 04 Jul 2013 08:02:13 -0400, monarch_dodra
wrote:
This is a pretty stupid question, but how would you allocate
an "int[]" on the heap? I'm not talking about the array, but
the actual slice object. EG:
int[]* pSlic
On Thu, 04 Jul 2013 08:02:13 -0400, monarch_dodra
wrote:
This is a pretty stupid question, but how would you allocate an "int[]"
on the heap? I'm not talking about the array, but the actual slice
object. EG:
int[]* pSlice = new int[];
//Error: new can only create structs,
//dynamic array
On Thursday, 4 July 2013 at 12:02:16 UTC, monarch_dodra wrote:
This is a pretty stupid question, but how would you allocate an
"int[]" on the heap? I'm not talking about the array, but the
actual slice object. EG:
int[]* pSlice = new int[];
//Error: new can only create structs,
//dynamic array
This is a pretty stupid question, but how would you allocate an
"int[]" on the heap? I'm not talking about the array, but the
actual slice object. EG:
int[]* pSlice = new int[];
//Error: new can only create structs,
//dynamic arrays or class objects, not int[]'s
Is there a simple "idiomatic" w