Re:We used C++20 to eliminate a class of runtime bugs
by pjmlp on Saturday January 15, 2022 @03:57AM
(#29944945)
To build up on sibling's answer that isn't the same thing.
The first one will call the initialization constructor, whereas the second form will initialize the object and then apply one form of copy construction, depending on which ones are available (user provided or compiler generated).
It just happens that for int that doesn't matter in practice.
The first one will call the initialization constructor, whereas the second form will initialize the object and then apply one form of copy construction, depending on which ones are available (user provided or compiler generated).
It just happens that for int that doesn't matter in practice.