blob: 445c92b4a6acb3d1f9ff418b84d067d96159636e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*
* File: example.cpp
* Purpose: Rope example.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
* Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#include <ocl/tproc/rope.hpp>
#ifndef STANDALONE
using namespace ocl;
#else
using namespace boost;
#endif
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> res(rope.concat(new_elem.get()));
io::println((++rope)->data());
io::println(rope.data());
}
|