c++1z - alloca() with VLAs and C++ -
the alloca()
replacement c++ have found on internet looks this:
template <typename f> void alloca_(::std::size_t const n, f&& f) noexcept(noexcept(f({}))) { alignas(::std::max_align_t) char p[n]; f(p); }
but, obviously, not alloca()
know , love, not function, nor macro. can alloca()
implementation resembles alloca()
function call semantics more closely, written? perhaps macro? whether macro or function, should allocate space stack, not heap.
Comments
Post a Comment