Try to atomically acquire a shared reference to the shared object.

Synopsis

Declared in <bslma_sharedptrrep.h>

bool
tryAcquireRef();

Description

Atomically acquire a shared reference to the shared object referred to by this representation, if the number of shared references is greater than 0, and do nothing otherwise. Return true if the acquire succeeds, and false otherwise. The behavior is undefined unless 0 < numWeakReferences() || 0 < numReferences().

Return Value

true if the acquire succeeds, and false otherwise

Created with MrDocs