summaryrefslogtreecommitdiffhomepage
path: root/include/ocl/io
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-23 20:16:02 -0500
committerGitHub <noreply@github.com>2025-11-23 20:16:02 -0500
commit85f89ee4bb137100cbeffcbc10168eb8ea52e6cc (patch)
treef6e2063319ceaaa02f523fb5c289e4f37411a2df /include/ocl/io
parent9a70f32ddaec0eef99efbf7ff5597c2adf08f45a (diff)
parent65a8349aa5526d071b18cd4d42586c46faaa3823 (diff)
Merge pull request #18 from amlel-el-mahrouss/developv1.0.48
OCL v1.0.48
Diffstat (limited to 'include/ocl/io')
-rw-r--r--include/ocl/io/print.hpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/ocl/io/print.hpp b/include/ocl/io/print.hpp
new file mode 100644
index 0000000..c710156
--- /dev/null
+++ b/include/ocl/io/print.hpp
@@ -0,0 +1,47 @@
+/*
+ * File: print.hpp
+ * Purpose: OCL Print library
+ * Author: Amlal El Mahrouss. (amlal@nekernel.org)
+ * Copyright 2025
+ */
+
+#ifndef _OCL_PRINT_HPP
+#define _OCL_PRINT_HPP
+
+#include <iostream>
+
+namespace ocl::io
+{
+ template <typename T>
+ inline void print(T fmt) noexcept
+ {
+ std::cout << fmt;
+ }
+
+ inline void print() noexcept
+ {
+ }
+
+ template <typename... Args>
+ inline void print(Args... fmt) noexcept
+ {
+ print(fmt...);
+ print();
+ }
+
+ template <typename T, typename... Args>
+ inline void print(T fmt, Args... other) noexcept
+ {
+ std::cout << fmt;
+ print(other...);
+ }
+
+ template <typename... T>
+ inline void println(T... fmt) noexcept
+ {
+ print(fmt...);
+ print("\n");
+ }
+} // namespace ocl::io
+
+#endif // ifndef _OCL_PRINT_HPP