What is the role of std::weak_ptr in C++?
-
A
To provide a non-owning reference that does not affect the reference count of a shared_ptr
-
B
To weakly enforce memory alignment for heap objects
-
C
To act as a fallback when unique_ptr ownership transfer fails
-
D
To observe stack-allocated objects safely