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 (2)

  1. yes, just like in Rust, where Drop and constructors are optional idioms.
    Replies (1)
    1. Manually implementing the Drop trait, perhaps, but the same can't be said for the drop operation, which you always get at the end of scope unless you opt out (which is very much a rare thing to do).