From 2aafdb8520b302f01e57c677ec694db58527dddd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 6 Jan 2026 19:41:27 +0100 Subject: chore: testing and example cleanup work. Signed-off-by: Amlal El Mahrouss --- example/simple_example/example.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'example/simple_example/example.cpp') diff --git a/example/simple_example/example.cpp b/example/simple_example/example.cpp index 5209494..445c92b 100644 --- a/example/simple_example/example.cpp +++ b/example/simple_example/example.cpp @@ -7,16 +7,19 @@ #include +#ifndef STANDALONE +using namespace ocl; +#else +using namespace boost; +#endif + int main() { - auto rope = ocl::tproc::crope("The Quick Brown Fox Jumps Over The Lazy Dog"); - - auto new_elem = new ocl::tproc::crope(", and Jumps again."); - auto res = rope.concat(new_elem); + auto rope = tproc::crope("The Quick Brown Fox Jumps Over The Lazy Dog"); - ocl::io::println((++rope)->data()); - ocl::io::println(rope.data()); + std::unique_ptr new_elem(new tproc::crope(", and Jumps again.")); + std::unique_ptr res(rope.concat(new_elem.get())); - delete new_elem; - delete res; + io::println((++rope)->data()); + io::println(rope.data()); } -- cgit v1.2.3