| 182 | // Ownership |
| 183 | |
| 184 | class destroyer { |
| 185 | public: |
| 186 | template <typename T> |
| 187 | void operator()(T* ptr) { |
| 188 | ptr->destroy(); |
| 189 | } |
| 190 | }; |
| 191 | |
| 192 | template<class T> using own = std::unique_ptr<T, destroyer>; |
| 193 | template<class T> using ownvec = vec<own<T>>; |