Not. You do not use the = operator at all; even if the = character is present, initialization is done only with the help of constructors. For this reason, some people prefer constructive type initialization:
T a = 1; // ctor T b(2); // ctor T c; c = 3; // ctor then op=
So you need a constructor that can accept int . Remember to mark it explicit .
In addition, for example, an assignment operator must return a link.
source share