Showing the changes to src/include (1 of 9 files). Show all
Unified · Split
| @@ -134,7 +134,13 @@ namespace disvm · 133 unmodified lines | ||
| 134 | 134 | pointer_t gc_reserved; |
| 135 | 135 | |
| 136 | 136 | public: |
| 137 | − pointer_t allocation() const; | |
| 137 | + pointer_t get_allocation() const; | |
| 138 | + | |
| 139 | + template <typename T> | |
| 140 | + T *get_allocation() const | |
| 141 | + { | |
| 142 | + return reinterpret_cast<T *>(get_allocation()); | |
| 143 | + } | |
| 138 | 144 | |
| 139 | 145 | private: |
| 140 | 146 | std::atomic<std::size_t> _ref_count; |