diff --git a/Test/paulmck/rcu.hpp b/Test/paulmck/rcu.hpp index c45b294..328fddc 100644 --- a/Test/paulmck/rcu.hpp +++ b/Test/paulmck/rcu.hpp @@ -105,11 +105,9 @@ namespace std { }; template> - void rcu_retire(T *p, D d = {}) + void rcu_retire(std::unique_ptr ptr) { typedef std::unique_ptr ptr_type; - ptr_type ptr(p, std::move(d)); - struct rcu_obj_base_ni : public rcu_obj_base, public ptr_type { @@ -118,4 +116,11 @@ namespace std { (new rcu_obj_base_ni(std::move(ptr)))->retire(); } + template> + void rcu_retire(T *p, D d = {}) + { + typedef std::unique_ptr ptr_type; + rcu_retire(ptr_type(p, std::move(d))); + } + } // namespace std