An unofficial, read-only Hacker News reader. Join the beta →

In C++, = default and {} are not the same constructor (opens external site)

129 points by surprisetalk 2 days ago | lemire.me | 198 comments on HN

View full thread · View on Hacker News

Comment thread (3)

  1. It also makes everything heap allocated and prevents dense representations, both of which are not good for performance.
    Replies (1)
    1. Could point to memory from alloca
      Replies (1)
      1. That doesn’t give you the lifetime freedom aspects of the heap, which is what’s required to not think about it.