From 65a8349aa5526d071b18cd4d42586c46faaa3823 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 02:13:48 +0100 Subject: feat! breaking changes for OCL v1.0.48. Signed-off-by: Amlal El Mahrouss --- include/ocl/io/print.hpp | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 include/ocl/io/print.hpp (limited to 'include/ocl/io') 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 + +namespace ocl::io +{ + template + inline void print(T fmt) noexcept + { + std::cout << fmt; + } + + inline void print() noexcept + { + } + + template + inline void print(Args... fmt) noexcept + { + print(fmt...); + print(); + } + + template + inline void print(T fmt, Args... other) noexcept + { + std::cout << fmt; + print(other...); + } + + template + inline void println(T... fmt) noexcept + { + print(fmt...); + print("\n"); + } +} // namespace ocl::io + +#endif // ifndef _OCL_PRINT_HPP -- cgit v1.2.3