Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
anonymoushn
· 13y ago · 0 comments
Does idiomatic C++ do heap allocations with malloc then?
Comments
[–]
cldr
13y 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
".
[–]
pkolaczk
13y ago
No. Idiomatic C++ allocates everything at compile time by means of template metaprogramming magic (just joking).
[–]
he_the_great
13y ago
No that is D and it is with CTFE. Also joking... mostly.