This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Add C++14's dynarray container (23.3.4, n3662).


On Wednesday 25 September 2013 17:57:28 Joe Buck wrote:
> As you say, dynarray should be the C++ equivalent of VLAs, so ideally the
> compiler could use the same code as is used for VLAs, perhaps by creating
> new builtin functions if there isn't something that can already be used.
> It might not be possible to produce a quality library-only implementation,
> compiler support might be needed.

I don't think it can be done without compiler support.  There would have to be 
a builtin function to allocate stack memory in the calling function to make it 
work.  (Calling alloca inside a dynarray library function of course won't do 
it.  Don't know why I tried it initially.)

Regards,
RÃdiger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]