Unofficial Hacker News client - receive Push Notifications on replies.

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

131 points by surprisetalk 5 days ago | lemire.me | 200 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (1)

  1. IIRC, one reason C++ uses overloading for all constructors is if the construction occurs in a template, the caller can select the constructors from outside by eg passing the correct arguments. If the constructor were named, there would be no way to pass in the name from outside the template.