A few other good answers point to the difference between building in place ( ClassType v(<constructor args>) ) and creating a temporary object and using the copy constructor to copy it ( ClassType v = <constructor arg> ). I think two more points need to be done. Firstly, the second form obviously has only one argument, so if your constructor accepts several arguments, you should prefer the first form (yes, there are ways around this, but I think the direct construction is more concise and readable, but, as indicated that personal preference).
Secondly, the form you use matters if your copy constructor does something significantly different from your standard constructor. In most cases, this will not be the case, and some will argue that this is a bad idea, but the language really allows you to do this (all the surprises that you end up with, because of this, is your own mistake).
twalberg
source share