summaryrefslogtreecommitdiffhomepage
path: root/dev/lib/io/print.hpp
blob: eb425c1e4ab4e75a1299da042fefe4451fa0e9a6 (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
42
/*
 * File: print.hpp
 * Purpose: SNU Print library
 * Author: Amlal El Mahrouss. (founder@snu.systems)
 * Copyright 2025, SNU Systems Corp.
 */

#ifndef _SNU_PRINT_HPP
#define _SNU_PRINT_HPP

#include <initializer_list>
#include <iostream>
#include <ostream>

namespace snu::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 snu::io

#endif // ifndef _SNU_PRINT_HPP