CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
to_string.h
Go to the documentation of this file.
1// -*- C++ -*-
14#ifndef __cxz_to_string_h__
15#define __cxz_to_string_h__
16
17#include "types.h"
18
19namespace CNORXZ
20{
25 template <typename T>
26 struct ToString
27 {
31 static String func(const T& a);
32 };
33
37 template <>
39 {
43 static String func(const String& a);
44 };
45
50 template <typename T>
51 struct ToString<Vector<T>>
52 {
56 static String func(const Vector<T>& a);
57 };
58
64 template <typename T, SizeT N>
65 struct ToString<Arr<T,N>>
66 {
70 static String func(const Arr<T,N>& a);
71 };
72
77 template <typename... Ts>
78 struct ToString<Tuple<Ts...>>
79 {
83 static String func(const Tuple<Ts...>& t);
84 };
85
91 template <typename T, typename S>
92 struct ToString<std::pair<T,S>>
93 {
97 static String func(const std::pair<T,S>& t);
98 };
99
105 template <typename T, typename S>
106 struct ToString<std::map<T,S>>
107 {
111 static String func(const std::map<T,S>& t);
112 };
113
117 template <>
119 {
123 static String func(const DType& a);
124 };
125
130 template <typename T>
131 String toString(const T& a);
132
133}
134
135#endif
std::string String
Definition types.h:42
std::vector< T, Allocator< T > > Vector
Definition types.h:310
Sptr< Range > rangeCast(const RangePtr r)
std::tuple< T... > Tuple
Definition types.h:60
std::array< T, N > Arr
Definition types.h:45
String toString(const T &a)
static String func(const T &a)
Declaration of all library types.