diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-24 23:34:39 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-25 00:04:08 -0500 |
| commit | 52399b9b2fe46e29c5ee265baf8cb7f1717a4c53 (patch) | |
| tree | 12c034291fd9d721b1eb9b8c16bcc65285936fe8 | |
| parent | b189449b28625cec7b6ce399f999072e50efae45 (diff) | |
feat: update comment to reflect purpose of tracked_ptr correctly.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | examples/tracked_ptr/tracked_ptr.cc | 3 | ||||
| -rw-r--r-- | include/ocl/core/error_handler.hpp | 4 | ||||
| -rw-r--r-- | include/ocl/memory/tracked_ptr.hpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/examples/tracked_ptr/tracked_ptr.cc b/examples/tracked_ptr/tracked_ptr.cc index 0f7c43d..3f1a4ec 100644 --- a/examples/tracked_ptr/tracked_ptr.cc +++ b/examples/tracked_ptr/tracked_ptr.cc @@ -46,7 +46,8 @@ int main(int argc, char** argv) std::cout << "total=" << ptr.manager().allocator().deallocated_count_ << std::endl; std::cout << "leak-detected=" << std::boolalpha << (ptr.manager().allocator().allocated_count_ > ptr.manager().allocator().deallocated_count_) << std::endl; - ocl::memory::must_pass(ptr); + ocl::standard_error_handler err; + ocl::memory::must_pass(ptr, err); return EXIT_SUCCESS; } diff --git a/include/ocl/core/error_handler.hpp b/include/ocl/core/error_handler.hpp index 717b522..a09f450 100644 --- a/include/ocl/core/error_handler.hpp +++ b/include/ocl/core/error_handler.hpp @@ -20,8 +20,8 @@ namespace ocl explicit basic_error_handler() = default; virtual ~basic_error_handler() = default; - basic_error_handler& operator=(const basic_error_handler&) = delete; - basic_error_handler(const basic_error_handler&) = delete; + basic_error_handler& operator=(const basic_error_handler&) = default; + basic_error_handler(const basic_error_handler&) = default; template <bool throw_too = false> void error(const std::basic_string<char>& msg) diff --git a/include/ocl/memory/tracked_ptr.hpp b/include/ocl/memory/tracked_ptr.hpp index fcaf898..029e424 100644 --- a/include/ocl/memory/tracked_ptr.hpp +++ b/include/ocl/memory/tracked_ptr.hpp @@ -1,6 +1,6 @@ /* * File: memory/tracked_ptr.hpp - * Purpose: Custom smart pointer implementation in C++ + * Purpose: Strict pointer type implementation in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ |
