summaryrefslogtreecommitdiffhomepage
path: root/example/simple_example/example.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-08 09:38:31 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-08 09:38:31 +0100
commit2d2a850a61dbe5695ba92dfc4dcb107c10d3bce6 (patch)
treef8486476d7056dc037db5362a46dfeb8a53adcda /example/simple_example/example.cpp
parent519f2f91dc3c5f465874c517c8d5c963e0444e45 (diff)
feat: `operator<<` for const crope/wrope. API improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'example/simple_example/example.cpp')
-rw-r--r--example/simple_example/example.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/example/simple_example/example.cpp b/example/simple_example/example.cpp
index da543a9..3feb686 100644
--- a/example/simple_example/example.cpp
+++ b/example/simple_example/example.cpp
@@ -7,6 +7,7 @@
#include <ocl/tproc/rope.hpp>
#include <iostream>
+#include <memory>
#ifndef STANDALONE
using namespace ocl;
@@ -18,9 +19,9 @@ int main()
{
auto rope = tproc::crope("The Quick Brown Fox Jumps Over The Lazy Dog");
- std::unique_ptr<tproc::crope> new_elem(new tproc::crope(", and Jumps again."));
+ std::unique_ptr<tproc::crope> new_elem = std::make_unique<tproc::crope>(", and Jumps again.");
std::unique_ptr<tproc::crope> res(rope.concat(new_elem.get()));
- std::cout << ++rope;
- std::cout << rope;
+ std::cout << *++rope << std::endl;
+ std::cout << rope << std::endl;
}