Skip to content

enh(core) add [[nodiscard]] attribute for weak/shared_ptr::lock()

Description

Adds [[nodiscard]] attributes in weak_ptr and shared_ptr lock() function. This avoids using lock() as lock function and force user to use returned lock_ptr object

Closes #588 (closed)

How to test it?

Compile all, check for nodiscard warnings.

Edited by Marc SCHWEITZER

Merge request reports