/* * File: smart_ptr.hpp * Purpose: Smart Pointer helpers. * Author: Amlal El Mahrouss (amlal@nekernel.org) * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. Licensed under the BSL 1.0 license */ #ifndef __OCL_SMART_PTR #define __OCL_SMART_PTR #include #include #include #include namespace ocl { template > using unique_ptr = std::unique_ptr; template using shared_ptr = std::shared_ptr; /// @brief Constructs a `delete_ptr`, that is, a pointer that isn't deleted from the heap. template inline auto delete_ptr(T* object) -> auto { return shared_ptr{object, boost::null_deleter{}}; } } // namespace ocl #endif // ifndef __OCL_SMART_PTR