cpp/memory/weak ptr/lock

Creates a new std that shares ownership of the managed object. If there is no managed object, i.e. is empty, then the returned  also is empty.

Effectively returns, executed atomically.

Parameters
(none)

Return value
A which shares ownership of the owned object if std returns. Else returns default-constructed of type.