Phobos for Review: std.buffer.scopebuffer

Jakob Ovrum jakobovrum at gmail.com
Sun Feb 9 04:55:01 PST 2014


On Sunday, 9 February 2014 at 12:25:51 UTC, Timon Gehr wrote:
> On 02/09/2014 01:12 PM, Jakob Ovrum wrote:
>> On Sunday, 9 February 2014 at 04:14:05 UTC, Marco Leise wrote:
>>> It depends on what syntax you expect. I solved it this way:
>>>
>>> void fun(alias length)(void* sneaky = alloca(length));
>>>
>>> void foo()
>>> {
>>>    size_t myLength = 42;
>>>    fun!myLength();
>>> }
>>
>> It defeats the point of alloca if the chunk size has to be 
>> known at
>> compile-time. ...
>
> Why would it need to be known at compile time? 42 is just an 
> example here; any other expression will do.

Nevermind, didn't see the alias.


More information about the Digitalmars-d mailing list