We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9409110 commit 47a9982Copy full SHA for 47a9982
safe_ptr.h
@@ -85,6 +85,7 @@ namespace sf {
85
public:
86
template<typename... Args>
87
safe_ptr(Args... args) : ptr(std::make_shared<T>(args...)), mtx_ptr(std::make_shared<mutex_t>()) {}
88
+ safe_ptr(std::unique_ptr<T>&& ptr) : ptr(std::move(ptr)), mtx_ptr(std::make_shared<mutex_t>()) {}
89
90
auto_lock_t<x_lock_t> operator -> () { return auto_lock_t<x_lock_t>(get_obj_ptr(), *get_mtx_ptr()); }
91
auto_lock_obj_t<x_lock_t> operator * () { return auto_lock_obj_t<x_lock_t>(get_obj_ptr(), *get_mtx_ptr()); }
0 commit comments