The effect is same for this case.
C c(3);
is direct intialization,
the constructors of T
are examined and the best match is selected by overload resolution. The constructor is then called to initialize the object.
C c{3};
is direct-list-initialization (since C++11),
If the previous stage does not produce a match, all constructors of T
participate in overload resolution against the set of arguments that consists of the elements of the braced-init-list, with the restriction that only non-narrowing conversions are allowed.
So for both cases C::C(int)
is used for initializing the object.
Depending on the behavior of C
, the other potential differences between C c(3);
and C c{3};
include: