This commit is contained in:
Sebastian Messmer 2015-04-27 22:13:28 +02:00
parent 77a50c8eb4
commit cf6a8079b4

View File

@ -9,6 +9,7 @@ namespace cpputils {
/**
* dynamic_cast implementation for unique_ptr (moving unique_ptr into a unique_ptr of different type)
*/
//TODO Also allow passing a rvalue reference, otherwise dynamic_pointer_move(func()) won't work
template<typename DST, typename SRC>
inline std::unique_ptr<DST> dynamic_pointer_move(std::unique_ptr<SRC> &source) {
//TODO Deleter