diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-18 12:56:45 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-18 12:56:45 +0100 |
| commit | c87aa0ceca04810350c0bf1dfcefad1286982e26 (patch) | |
| tree | 2fbbd9e30f48164107ef234f4bac276993d21a68 | |
| parent | 407b8d54dd008afd52d59f4732dc3d493c16c552 (diff) | |
chore: `smart_ptr.hpp` improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | include/ocl/smart_ptr.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/ocl/smart_ptr.hpp b/include/ocl/smart_ptr.hpp index 489f277..4bdff42 100644 --- a/include/ocl/smart_ptr.hpp +++ b/include/ocl/smart_ptr.hpp @@ -15,18 +15,18 @@ namespace ocl { - template <class T, class Del = std::default_delete<T>> - using unique_ptr = std::unique_ptr<T, Del>; + template <class Type, class Del = std::default_delete<Type>> + using unique_ptr = std::unique_ptr<Type, Del>; - template <class T> - using shared_ptr = std::shared_ptr<T>; + template <class Type> + using shared_ptr = std::shared_ptr<Type>; /// @brief Constructs a `delete_ptr`, that is, a pointer that isn't deleted from the heap. - template <class T> - inline auto delete_ptr(T* object) -> auto + template <class Type> + inline auto delete_ptr(Type* object) -> shared_ptr<Type> { - return shared_ptr<T>{object, boost::null_deleter{}}; + return shared_ptr<Type>{object, boost::null_deleter{}}; } } // namespace ocl -#endif // ifndef __OCL_SMART_PTR
\ No newline at end of file +#endif // ifndef __OCL_SMART_PTR |
