New blog location
New blog location
These are the various types of initialization:
T obj{}
T obj{v}
T obj = v
Copy initialization should be avoided for user defined types to prevent potentially unnecessary copies
float f{2.0}; int k{f}; //throws narrowing warning or error
Comments
Post a Comment