diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-06 19:41:27 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-06 19:42:58 +0100 |
| commit | 2aafdb8520b302f01e57c677ec694db58527dddd (patch) | |
| tree | 36aca9abab0536e539322bdf998fb4a039e1b0e3 /example/simple_example | |
| parent | eab7839be9b69aa9c3fafc3510e0aaee8d339508 (diff) | |
chore: testing and example cleanup work.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'example/simple_example')
| -rw-r--r-- | example/simple_example/example.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
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 <ocl/tproc/rope.hpp> +#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<tproc::crope> new_elem(new tproc::crope(", and Jumps again.")); + std::unique_ptr<tproc::crope> res(rope.concat(new_elem.get())); - delete new_elem; - delete res; + io::println((++rope)->data()); + io::println(rope.data()); } |
