Hacker News new | ask | show | jobs
by dmitrykoval 1855 days ago
Both are legal statements.

The second one is a direct initialization, invoking corresponding constructor.

The first one first invokes default constructor and then copy or move assignment depending on rvalueness of the arg.