summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--example/simple_example/example.cpp5
-rw-r--r--include/ocl/tproc/rope.hpp12
2 files changed, 15 insertions, 2 deletions
diff --git a/example/simple_example/example.cpp b/example/simple_example/example.cpp
index 445c92b..da543a9 100644
--- a/example/simple_example/example.cpp
+++ b/example/simple_example/example.cpp
@@ -6,6 +6,7 @@
*/
#include <ocl/tproc/rope.hpp>
+#include <iostream>
#ifndef STANDALONE
using namespace ocl;
@@ -20,6 +21,6 @@ int main()
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());
+ std::cout << ++rope;
+ std::cout << rope;
}
diff --git a/include/ocl/tproc/rope.hpp b/include/ocl/tproc/rope.hpp
index 2a02f05..05e5399 100644
--- a/include/ocl/tproc/rope.hpp
+++ b/include/ocl/tproc/rope.hpp
@@ -194,4 +194,16 @@ namespace ocl::tproc
} // namespace ocl::tproc
+inline std::ostream & operator<<(std::ostream& os, ocl::tproc::crope& r){
+ os << r.data();
+ return os;
+}
+
+inline std::wostream & operator<<(std::wostream& os, ocl::tproc::wrope& r){
+ os << r.data();
+ return os;
+}
+
+#include "rope.inl"
+
#endif // __OCL_TPROC_ROPE_HPP