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
That's a reasonable point. The member can not just be an ordinary T object since we need to be able to manually control the construction and destruction. The two main ways to achieve this are either:
using an aligned char array (here)
by using a single-member union, i.e., union { T value; }
The union member acts like an ordinary member except that we are responsible for manually constructing and destructing it. When I last looked at libc++, libstdc++, and Microsoft STL's implementation of std::shared_ptr, both of these techniques were used by at least one of them, so neither seems strictly preferred. The union would be easier to debug though, so we could switch to that.
If you want to Pull Request that change I'll take it. Otherwise I can do it myself at some point, but it might be a bit later since I am busy right now.
concurrent_deferred_rc/include/cdrc/internal/counted_object.h
Line 22 in f1fb49b
The text was updated successfully, but these errors were encountered: