philwave at gmail.com
Thu Aug 8 10:29:41 CEST 2019
Yet, what is the usefullness of qIntrusiveDetached()?
Because the result depends on a relaxed load, hence the moment after
qIntrusiveDetached() was evaluated, rechecking qIntrusiveDetached()
could give a different result.
On Thu, 08 Aug 2019 11:09:57 +0300
"Mutz, Marc via Development" <development at qt-project.org> wrote:
> On 2019-08-08 10:29, Philippe wrote:
> > Looks good, except that your proposed qIntrusiveDetached()
> > has (apparently) the same "uncertainty" that caused
> > shared_ptr::unique()
> > to be deprecated.
> > https://en.cppreference.com/w/cpp/memory/shared_ptr/unique
> The problem with shared_ptr::unique() is weak_ptr: weak_ptr::lock() can
> materialize new strong references at any time, cf. wg21.link/P1116 for a
> possible solution (which, however, isn't implementable in an
> ABI-compatible fashion on most platforms).
> QISP doesn't have an associated weak_ptr.
> Development mailing list
> Development at qt-project.org
More information about the Development