Re: scoped allocations

2013-11-26 Thread Namespace
On Tuesday, 26 November 2013 at 23:33:59 UTC, Namespace wrote: First of all: I apologize for my bad english. In the last few weeks I searched for a way to allocate nicely temporary buffer of unknown lengths. Should be "[...] of unknown lengths at compile time".

Re: scoped allocations

2013-11-27 Thread Andrea Fontana
On Tuesday, 26 November 2013 at 23:33:59 UTC, Namespace wrote: Temp!int arr = Temp!int(512); /// arr is destroyed at the end of the scope But that does not look very nice (especially because Temp!int does not indicate that it holds an array). If you call it something other than "Temp"

Re: scoped allocations

2013-11-27 Thread Sönke Ludwig
Am 27.11.2013 09:54, schrieb Andrea Fontana: > On Tuesday, 26 November 2013 at 23:33:59 UTC, Namespace wrote: >> >> Temp!int arr = Temp!int(512); /// arr is destroyed at the end of the >> scope >> >> >> But that does not look very nice (especially because Temp!int does not >> indicate that it

Re: scoped allocations

2013-11-27 Thread Namespace
On Wednesday, 27 November 2013 at 08:55:01 UTC, Andrea Fontana wrote: On Tuesday, 26 November 2013 at 23:33:59 UTC, Namespace wrote: Temp!int arr = Temp!int(512); /// arr is destroyed at the end of the scope But that does not look very nice (especially because Temp!int does not indicat

Re: scoped allocations

2013-11-28 Thread Denis Shelomovskij
27.11.2013 3:33, Namespace пишет: First of all: I apologize for my bad english. In the last few weeks I searched for a way to allocate nicely temporary buffer of unknown lengths. You can use `unstd.memory.allocation.tempAlloc` [1]. Also there is `unstd.c.string.tempCString` [2] for common cas

Re: scoped allocations

2013-11-28 Thread Namespace
On Thursday, 28 November 2013 at 17:12:01 UTC, Denis Shelomovskij wrote: 27.11.2013 3:33, Namespace пишет: First of all: I apologize for my bad english. In the last few weeks I searched for a way to allocate nicely temporary buffer of unknown lengths. You can use `unstd.memory.allocation.te