diff options
| author | Amlal <amlal@nekernel.org> | 2025-08-15 12:09:28 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-08-15 12:09:28 +0200 |
| commit | 70945244a35e0e6d2a2e0f84ae83f31b9898a0ca (patch) | |
| tree | 2bf642b31c914a36c36f10b20ea5189ca3c47c09 /dev/lib/io | |
| parent | 37bc0133c137cdf7fe62e79ac8208ec46096316e (diff) | |
feat: new hpptest and gtest module. Other module improvements.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/lib/io')
| -rw-r--r-- | dev/lib/io/print.hpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/dev/lib/io/print.hpp b/dev/lib/io/print.hpp index 36192c4..eb425c1 100644 --- a/dev/lib/io/print.hpp +++ b/dev/lib/io/print.hpp @@ -13,31 +13,30 @@ #include <ostream> namespace snu::io -{ - template <typename T> - inline void printv(T fmt) noexcept +{ + template <typename T, typename... Args> + inline void print(T fmt, Args... other) noexcept { std::cout << fmt; + print(other...); } template <typename T> - inline void printv(std::initializer_list<T> fmt) noexcept + inline void print(T fmt) noexcept { std::cout << fmt; } - template <typename... T> - inline void print(T... fmt) noexcept + inline void print() noexcept { - (printv(fmt), ...); + std::cout << std::endl; } template <typename... T> inline void println(T... fmt) noexcept { - print(static_cast<T>(fmt)...); - std::cout << std::endl; + print(fmt...); } } // namespace snu::io -#endif // ifndef _SNU_PRINT_HPP
\ No newline at end of file +#endif // ifndef _SNU_PRINT_HPP |
