11 #ifndef WRENCH_POINTERUTIL_H 12 #define WRENCH_POINTERUTIL_H 41 typename std::set<std::unique_ptr<T>>::iterator it,
42 std::set<std::unique_ptr<T>> *from,
43 std::set<std::unique_ptr<T>> *to)
46 auto tmp =
const_cast<std::unique_ptr<T>&&
>(*it);
48 (*to).insert(std::move(tmp));
61 typename std::set<std::shared_ptr<T>>::iterator it,
62 std::set<std::shared_ptr<T>> *from,
63 std::set<std::shared_ptr<T>> *to)
66 auto tmp =
const_cast<std::shared_ptr<T>&&
>(*it);
81 static void moveUniquePtrFromDequeToSet(
82 typename std::deque<std::unique_ptr<T>>::iterator it,
83 std::deque<std::unique_ptr<T>> *from,
84 std::set<std::unique_ptr<T>> *to)
87 auto tmp =
const_cast<std::unique_ptr<T>&&
>(*it);
89 (*to).insert(std::move(tmp));
102 static void moveSingleSeparateUniquePtrFromSetToSet(std::unique_ptr<T1>* ptr,
103 std::set<std::unique_ptr<T1>> *from,
104 std::set<std::unique_ptr<T1>> *to);
118 #endif //WRENCH_POINTERUTIL_H static void moveSharedPtrFromSetToSet(typename std::set< std::shared_ptr< T >>::iterator it, std::set< std::shared_ptr< T >> *from, std::set< std::shared_ptr< T >> *to)
A helper method to move a shared_ptr from a set to another.
Definition: PointerUtil.h:60
static void moveUniquePtrFromSetToSet(typename std::set< std::unique_ptr< T >>::iterator it, std::set< std::unique_ptr< T >> *from, std::set< std::unique_ptr< T >> *to)
A helper method to move a unique_ptr from a set to another.
Definition: PointerUtil.h:40
A helper class that implements useful smart pointer operations.
Definition: PointerUtil.h:28
Definition: TerminalOutput.cpp:15