summaryrefslogtreecommitdiffhomepage
path: root/include/ocl/io
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-30 00:42:50 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-30 00:42:50 -0500
commite6579534e7c64be652ffeb74be7c977564a3ddab (patch)
tree69b908f5b2d81f477d3cfe39ecc6c01fbdc89657 /include/ocl/io
parenta8e99f3a783069cf85b626c6cfb2fbe83ae4fd44 (diff)
chore & feat: final library changes to stabilize changes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/ocl/io')
-rw-r--r--include/ocl/io/print.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/ocl/io/print.hpp b/include/ocl/io/print.hpp
index 9629e05..1220cec 100644
--- a/include/ocl/io/print.hpp
+++ b/include/ocl/io/print.hpp
@@ -9,14 +9,17 @@
#define _OCL_PRINT_HPP
#include <core/config.hpp>
+
#include <iostream>
+#define console_io_out std::cout
+
namespace ocl::io
{
template <typename T>
inline void print(T fmt) noexcept
{
- std::cout << fmt;
+ console_io_out << fmt;
}
inline void print() noexcept {}
@@ -31,7 +34,7 @@ namespace ocl::io
template <typename T, typename... Args>
inline void print(T fmt, Args... other) noexcept
{
- std::cout << fmt;
+ console_io_out << fmt;
print(other...);
}
@@ -39,8 +42,15 @@ namespace ocl::io
inline void println(T... fmt) noexcept
{
print(fmt...);
+
+#ifdef _WIN32
+ print("\r\n");
+#else
print("\n");
+#endif
}
} // namespace ocl::io
+#undef console_io_out
+
#endif // ifndef _OCL_PRINT_HPP