cnorxz/src/include/base/to_string.h

51 lines
811 B
C
Raw Normal View History

2022-09-11 02:48:30 +02:00
#ifndef __cxz_to_string_h__
#define __cxz_to_string_h__
#include "types.h"
namespace CNORXZ
{
template <typename T>
struct ToString
{
static String func(const T& a);
};
2022-09-11 02:48:30 +02:00
2022-09-15 16:45:45 +02:00
template <>
struct ToString<String>
{
static String func(const String& a);
};
2022-09-11 02:48:30 +02:00
template <typename T>
struct ToString<Vector<T>>
{
static String func(const Vector<T>& a);
};
2022-09-11 02:48:30 +02:00
template <typename T, SizeT N>
struct ToString<Arr<T,N>>
{
static String func(const Arr<T,N>& a);
};
2022-09-11 02:48:30 +02:00
template <typename... Ts>
struct ToString<Tuple<Ts...>>
{
static String func(const Tuple<Ts...>& t);
};
2022-09-11 02:48:30 +02:00
template <>
struct ToString<DType>
{
static String func(const DType& a);
};
template <typename T>
String toString(const T& a);
2022-09-11 02:48:30 +02:00
}
#endif