Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1287

Comment by HolyBlackCat on Why does making allocator a data member change the generated assembly?

$
0
0
If I pass by reference instead (bar(Storage<type> &n)), both versions generate the same assembly (the one with addq). Probably something about the allocator prevents it from being passed in a register? Cppreference says it has non-trivial (despite being empty) constructor and destructor, probably that's why. Quite a shame.

Viewing all articles
Browse latest Browse all 1287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>