summaryrefslogtreecommitdiffhomepage
path: root/example/smart_ptr_example/example.cc
diff options
context:
space:
mode:
Diffstat (limited to 'example/smart_ptr_example/example.cc')
-rw-r--r--example/smart_ptr_example/example.cc8
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;
}