summaryrefslogtreecommitdiffhomepage
path: root/dev/lib/io/print.hpp
blob: 4b32ddb7a9b81838ff54d9c80575783875655994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * 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>
#include <ostream>

namespace ocl::io
{
	template <typename T, typename... Args>
	inline void print(T fmt, Args... other) noexcept
	{
		std::cout << fmt;
		print(other...);
	}

	template <typename T>
	inline void print(T fmt) noexcept
	{
		std::cout << fmt;
	}

	inline void print() noexcept
	{
		std::cout << std::endl;
	}

	template <typename... T>
	inline void println(T... fmt) noexcept
	{
		print(fmt...);
	}
} // namespace ocl::io

#endif // ifndef _OCL_PRINT_HPP