56 lines
1 KiB
C++
56 lines
1 KiB
C++
|
|
|
|
#include <stdio.h>
|
|
|
|
template <typename T> void print(const T t);
|
|
|
|
template <> void print<bool>(const bool b);
|
|
|
|
template <> void print<char*>(char* x);
|
|
|
|
template <> void print<const char*>(const char* x);
|
|
|
|
template <> void print<char>(const char x);
|
|
|
|
template <> void print<signed char>(const signed char x);
|
|
|
|
template <> void print<unsigned char>(const unsigned char x);
|
|
|
|
template <> void print<signed short>(const signed short x);
|
|
|
|
template <> void print<unsigned short>(const unsigned short x);
|
|
|
|
template <> void print<signed int>(const signed int x);
|
|
|
|
template <> void print<unsigned int>(const unsigned int x);
|
|
|
|
template <> void print<signed long>(const signed long x);
|
|
|
|
template <> void print<unsigned long>(const unsigned long x);
|
|
|
|
template <> void print<float>(const float x);
|
|
|
|
template <> void print<double>(const double x);
|
|
|
|
template <typename F, typename ...R> void print(const F& f, const R&... r)
|
|
{
|
|
print(f), print(r ...);
|
|
}
|
|
|
|
template <typename ...T> void println(const T&... t)
|
|
{
|
|
print(t ...), puts("");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|