Y
Hacker News
new
|
ask
|
show
|
jobs
by
anonymoushn
4629 days ago
Does idiomatic C++ do heap allocations with malloc then?
2 comments
cldr
4629 days ago
Idiomatic C++ would allocate everything possible on the stack, and if that wasn't possible, use `make_shared`/`make_unique`. So maybe I will change it to say "doesn't use `new`
directly
".
link
pkolaczk
4629 days ago
No. Idiomatic C++ allocates everything at compile time by means of template metaprogramming magic (just joking).
link
he_the_great
4629 days ago
No that is D and it is with CTFE. Also joking... mostly.
link