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. How is it ensured that make_foo will actually call make_foo_base?
    Replies (2)
    1. You are right, sorry, lost track or the thread.
    2. Because it needs a FooBase to give as the value for .base or the struct initialization isn't valid because it doesn't give values for all the members?