Date: Mon, 01 Jun 2026 08:07:07 -0700
On Monday, 1 June 2026 07:49:53 Pacific Daylight Time Sebastian Wittmeier via
Std-Proposals wrote:
> Can't you just define an object managing a linked list with alloca? And
> calling a member function to append a new object?
You can't do alloca with anything other than macros and language constructs.
Anything in the library would necessarily be a function and thus memory it
allocates with alloca would be gone by the time it returned to the caller
code.
If you remove the need for alloca and just use the heap, then the problem
simplifies greatly.
Std-Proposals wrote:
> Can't you just define an object managing a linked list with alloca? And
> calling a member function to append a new object?
You can't do alloca with anything other than macros and language constructs.
Anything in the library would necessarily be a function and thus memory it
allocates with alloca would be gone by the time it returned to the caller
code.
If you remove the need for alloca and just use the heap, then the problem
simplifies greatly.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-06-01 15:07:18
