retain-ptr icon indicating copy to clipboard operation
retain-ptr copied to clipboard

WG21 P0468 implementation of an intrusive smart pointer for C++

Results 3 retain-ptr issues
Sort by recently updated
recently updated
newest added

In [`template struct retain_traits`](https://github.com/slurps-mad-rips/retain-ptr/blob/7e5edfb1fa4d7a784c3d54b63a42cb306a636b07/include/sg14/memory.hpp#L107), the `decrement` functions seem to delete the object in the wrong situations: ```C++ static void decrement (atomic_reference_count* ptr) noexcept { ptr->count.fetch_sub(1, std::memory_order_acq_rel); if (not use_count(ptr)) {...

The following code examples illustrates a current severe limitation with `retain_ptr` ```C++ #include #include #include "sg14/memory.hpp" using namespace std; class Base { public: Base() { } mutable unsigned int _rc...

Is ```C++ #include using std::cout; using std::endl; class S { public: S(int x_) : x(x_) {} ~S() { cout