You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm reading this correctly, the copy constructor does not initialize copies_count. That means if you make a copy of a copy, the new object will do ++other.copies_count; on an uninitialized variable.
Is there any reason not to initialize copies_count to zero here?
Using default member initializers for all four data members seems sensible.
The text was updated successfully, but these errors were encountered:
https://github.com/oneapi-src/oneTBB/blob/1f52f5093ec7ce23829fe64ab82ac5541fea42ee/test/conformance/conformance_flowgraph.h#L335-L351
If I'm reading this correctly, the copy constructor does not initialize
copies_count
. That means if you make a copy of a copy, the new object will do++other.copies_count;
on an uninitialized variable.Is there any reason not to initialize
copies_count
to zero here?Using default member initializers for all four data members seems sensible.
The text was updated successfully, but these errors were encountered: