diff options
Diffstat (limited to 'example/simple_example/example.cpp')
| -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()); } |
