Fix cpputils::destruct()

This commit is contained in:
Sebastian Messmer 2015-07-21 15:44:36 +02:00
parent b5d9f07f7a
commit 7b72cd4fe9

View File

@ -87,7 +87,7 @@ inline boost::optional<unique_ref<T>> nullcheck(std::unique_ptr<T> ptr) {
}
template<typename T> inline void destruct(unique_ref<T> ptr) {
to_unique_ptr(ptr).reset();
to_unique_ptr(std::move(ptr)).reset();
}
//TODO Also allow passing a rvalue reference, otherwise dynamic_pointer_move(func()) won't work