diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-20 22:37:50 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-20 22:37:50 +0100 |
| commit | a632dca2ff053fee51e6ebcea88000d38ebbca34 (patch) | |
| tree | b70e9e10fdb8dbd9fef284136981b54888f4a1df /example/smart_ptr_example/example.cc | |
| parent | 6471853426716df7f5b804649d0cf74df340dfe5 (diff) | |
chore: API and design improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'example/smart_ptr_example/example.cc')
| -rw-r--r-- | example/smart_ptr_example/example.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/example/smart_ptr_example/example.cc b/example/smart_ptr_example/example.cc index ef1a865..a8293f2 100644 --- a/example/smart_ptr_example/example.cc +++ b/example/smart_ptr_example/example.cc @@ -2,9 +2,13 @@ #include <ocl/print.hpp> #include <ocl/smart_ptr.hpp> -int main(int argc, char** argv) +auto main(int argc, char** argv) -> int { ocl::shared_ptr<std::ostream> smart = ocl::delete_ptr(&std::cout); + *smart << "hello, world\n"; - return 0; + ocl::tracked_ptr<int> tracked = ocl::make_tracked<int>(10); + *smart << *tracked << "\n"; + + return EXIT_SUCCESS; } |
