4 ms·
But std::shared_ptr is also a value type :)
by spacechild1 3y ago
But std::shared_ptr is also a value type :)
- mgaunard 3y agoIt isn't. If you copy a value and change the copy, the original is unaffected.
- spacechild1 3y agoC++ classes in general are value types. The fact that instances might share a common resource does not change that. See also https://learn.microsoft.com/en-us/cpp/cpp/value-types-modern-cpp?view=msvc-170 https://learn.microsoft.com/en-us/cpp/cpp/value-types-modern....