ToStringS.hpp
Go to the documentation of this file.
1 //
2 // Balau core C++ library
3 //
4 // Copyright (C) 2008 Bora Software (contact@borasoftware.com)
5 //
6 // Licensed under the Boost Software License - Version 1.0 - August 17th, 2003.
7 // See the LICENSE file for the full license text.
8 //
9 
15 
16 #ifndef COM_BORA_SOFTWARE__BALAU_APPLICATION__TO_STRING_S
17 #define COM_BORA_SOFTWARE__BALAU_APPLICATION__TO_STRING_S
18 
19 #include <Balau/Type/StdTypes.hpp>
20 #include <Balau/Type/Impl/ToStringImpl.hpp>
21 
22 #include <boost/lexical_cast.hpp>
23 #include <boost/locale.hpp>
24 
25 #include <complex>
26 #include <forward_list>
27 #include <list>
28 #include <map>
29 #include <unordered_set>
30 #include <unordered_map>
31 #include <stack>
32 #include <queue>
33 
34 template <typename P1, typename P2, typename ... P>
35 std::string toString(const P1 & p1, const P2 & p2, const P & ... p);
36 
37 template <typename P1, typename P2, typename ... P>
38 std::u16string toString16(const P1 & p1, const P2 & p2, const P & ... p);
39 
40 template <typename P1, typename P2, typename ... P>
41 std::u32string toString32(const P1 & p1, const P2 & p2, const P & ... p);
42 
44 
48 inline std::string toString(const std::string & value) {
49  return value;
50 }
51 
55 inline std::string toString(const std::string_view & value) {
56  return std::string(value);
57 }
58 
59 #ifndef BALAU_USE_BOOST_STRING_VIEW
60 
64 inline std::string toString(const boost::string_view & value) {
65  return value.to_string();
66 }
67 
68 #endif
69 
73 inline std::string toString(const std::u16string & value) {
74  return boost::locale::conv::utf_to_utf<char, char16_t>(value);
75 }
76 
80 inline std::string toString(const std::u16string_view & value) {
81  return boost::locale::conv::utf_to_utf<char, char16_t>(std::u16string(value));
82 }
83 
87 inline std::string toString(const std::u32string & value) {
88  return boost::locale::conv::utf_to_utf<char, char32_t>(value);
89 }
90 
94 inline std::string toString(const std::u32string_view & value) {
95  return boost::locale::conv::utf_to_utf<char, char32_t>(std::u32string(value));
96 }
97 
101 inline std::string toString(char value) {
102  std::string str;
103  str += value;
104  return str;
105 }
106 
110 inline std::string toString(char16_t value) {
111  std::u16string str;
112  str += value;
113  return toString(str);
114 }
115 
119 inline std::string toString(char32_t value) {
120  std::u32string str;
121  str += value;
122  return toString(str);
123 }
124 
128 inline std::string toString(signed char value) {
129  return Balau::Impl::toString<std::allocator<char>>("%d", (int) value);
130 }
131 
135 inline std::string toString(short value) {
136  return Balau::Impl::toString<std::allocator<char>>("%d", (int) value);
137 }
138 
142 inline std::string toString(int value) {
143  return Balau::Impl::toString<std::allocator<char>>("%d", value);
144 }
145 
149 inline std::string toString(long value) {
150  return Balau::Impl::toString<std::allocator<char>>("%ld", value);
151 }
152 
156 inline std::string toString(long long value) {
157  return Balau::Impl::toString<std::allocator<char>>("%lld", value);
158 }
159 
163 inline std::string toString(unsigned char value) {
164  return Balau::Impl::toString<std::allocator<char>>("%u", (unsigned int) value);
165 }
166 
170 inline std::string toString(unsigned short value) {
171  return Balau::Impl::toString<std::allocator<char>>("%u", (unsigned int) value);
172 }
173 
177 inline std::string toString(unsigned int value) {
178  return Balau::Impl::toString<std::allocator<char>>("%u", value);
179 }
180 
184 inline std::string toString(unsigned long value) {
185  return Balau::Impl::toString<std::allocator<char>>("%lu", value);
186 }
187 
191 inline std::string toString(unsigned long long value) {
192  return Balau::Impl::toString<std::allocator<char>>("%llu", value);
193 }
194 
198 inline std::string toString(float value) {
199  return boost::lexical_cast<std::string>(value);
200 }
201 
205 inline std::string toString(double value) {
206  return boost::lexical_cast<std::string>(value);
207 }
208 
212 inline std::string toString(long double value) {
213  return boost::lexical_cast<std::string>(value);
214 }
215 
219 template <typename T> inline std::string toString(const std::complex<T> & value) {
220  return toString(value.real(), " + j", value.imag());
221 }
222 
226 inline std::string toString(bool value) {
227  return value ? "true" : "false";
228 }
229 
233 inline std::string toString(const char * value) {
234  return std::string(value);
235 }
236 
237 std::u16string toString16(const char16_t * value);
238 std::u32string toString32(const char32_t * value);
239 
243 inline std::string toString(const char16_t * value) {
244  return toString(toString16(value));
245 }
246 
250 inline std::string toString(const char32_t * value) {
251  return toString(toString32(value));
252 }
253 
260 inline std::string toString(const void * ptr) {
261  return toString((size_t) ptr);
262 }
263 
270 inline std::string toString(std::nullptr_t) {
271  return "0";
272 }
273 
277 inline std::string toString(std::type_index value) {
278  return value.name();
279 }
280 
284 inline std::string toString(const std::function<std::string ()> & f) {
285  return f();
286 }
287 
291 template <typename F, typename S>
292 inline std::string toString(const std::pair<F, S> & p) {
293  return std::string("{ ") + toString(p.first) + ", " + toString(p.second) + " }";
294 }
295 
301 template <typename ... T, template <typename ...> class C>
302 inline std::string toStringHelper(const C<T ...> & c) {
303  std::string builder = "{";
304  std::string prefix = " ";
305  bool empty = true;
306 
307  for (const auto & e : c) {
308  builder += prefix + toString(e);
309  prefix = ", ";
310  empty = false;
311  }
312 
313  if (!empty) {
314  builder += " ";
315  }
316 
317  builder += "}";
318 
319  return builder;
320 }
321 
325 #define BALAU_CONTAINER1_TO_STRING(CONTAINER_TYPE) \
326  template <typename T> \
327  inline std::string toString(const CONTAINER_TYPE<T> & c) { \
328  return toStringHelper(c); \
329  }
330 
334 #define BALAU_CONTAINER2_TO_STRING(CONTAINER_TYPE) \
335  template <typename T, typename U> \
336  inline std::string toString(const CONTAINER_TYPE<T, U> & c) { \
337  return toStringHelper(c); \
338  }
339 
343 #define BALAU_CONTAINER3_TO_STRING(CONTAINER_TYPE) \
344  template <typename T, typename U, typename V> \
345  inline std::string toString(const CONTAINER_TYPE<T, U, V> & c) { \
346  return toStringHelper(c); \
347  }
348 
352 #define BALAU_CONTAINER4_TO_STRING(CONTAINER_TYPE) \
353  template <typename T, typename U, typename V, typename W> \
354  inline std::string toString(const CONTAINER_TYPE<T, U, V, W> & c) { \
355  return toStringHelper(c); \
356  }
357 
361 #define BALAU_CONTAINER5_TO_STRING(CONTAINER_TYPE) \
362  template <typename T, typename U, typename V, typename W, typename X> \
363  inline std::string toString(const CONTAINER_TYPE<T, U, V, W, X> & c) { \
364  return toStringHelper(c); \
365  }
366 
367 BALAU_CONTAINER2_TO_STRING(std::deque)
368 BALAU_CONTAINER2_TO_STRING(std::forward_list)
371 BALAU_CONTAINER3_TO_STRING(std::multiset)
372 BALAU_CONTAINER4_TO_STRING(std::multimap)
373 BALAU_CONTAINER3_TO_STRING(std::priority_queue)
374 BALAU_CONTAINER2_TO_STRING(std::queue)
376 BALAU_CONTAINER2_TO_STRING(std::stack)
377 BALAU_CONTAINER5_TO_STRING(std::unordered_map)
378 BALAU_CONTAINER5_TO_STRING(std::unordered_multimap)
379 BALAU_CONTAINER4_TO_STRING(std::unordered_multiset)
380 BALAU_CONTAINER3_TO_STRING(std::unordered_set)
381 BALAU_CONTAINER2_TO_STRING(std::vector)
382 
383 template <typename T, size_t N> inline std::string toString(const std::array<T, N> & c) {
389  return toStringHelper(c);
390 }
391 
398 template <typename P1, typename P2, typename ... P>
399 inline std::string toString(const P1 & p1, const P2 & p2, const P & ... p) {
400  return toString(p1) + toString(p2) + (std::string() + ... + toString(p));
401 }
402 
404 
408 inline std::u16string toString16(const std::string & value) {
409  return boost::locale::conv::utf_to_utf<char16_t, char>(value);
410 }
411 
415 inline std::u16string toString16(const std::string_view & value) {
416  return toString16(std::string(value));
417 }
418 
419 #ifndef BALAU_USE_BOOST_STRING_VIEW
420 
424 inline std::u16string toString16(const boost::string_view & value) {
425  return toString16(value.to_string());
426 }
427 
428 #endif
429 
433 inline std::u16string toString16(const std::u16string & value) {
434  return value;
435 }
436 
440 inline std::u16string toString16(const std::u16string_view & value) {
441  return std::u16string(value);
442 }
443 
447 inline std::u16string toString16(const std::u32string & value) {
448  return boost::locale::conv::utf_to_utf<char16_t, char32_t>(value);
449 }
450 
454 inline std::u16string toString16(char value) {
455  std::string str;
456  str += value;
457  return toString16(str);
458 }
459 
463 inline std::u16string toString16(char16_t & value) {
464  std::u16string str;
465  str += value;
466  return str;
467 }
468 
472 inline std::u16string toString16(char32_t & value) {
473  std::u32string str;
474  str += value;
475  return toString16(str);
476 }
477 
481 inline std::u16string toString16(signed char value) {
482  return toString16(toString(value));
483 }
484 
488 inline std::u16string toString16(short value) {
489  return toString16(toString(value));
490 }
491 
495 inline std::u16string toString16(int value) {
496  return toString16(toString(value));
497 }
498 
502 inline std::u16string toString16(long value) {
503  return toString16(toString(value));
504 }
505 
509 inline std::u16string toString16(long long value) {
510  return toString16(toString(value));
511 }
512 
516 inline std::u16string toString16(unsigned char value) {
517  return toString16(toString(value));
518 }
519 
523 inline std::u16string toString16(unsigned short value) {
524  return toString16(toString(value));
525 }
526 
530 inline std::u16string toString16(unsigned int value) {
531  return toString16(toString(value));
532 }
533 
537 inline std::u16string toString16(unsigned long value) {
538  return toString16(toString(value));
539 }
540 
544 inline std::u16string toString16(unsigned long long value) {
545  return toString16(toString(value));
546 }
547 
551 inline std::u16string toString16(float value) {
552  return toString16(toString(value));
553 }
554 
558 inline std::u16string toString16(double value) {
559  return toString16(toString(value));
560 }
561 
565 inline std::u16string toString16(long double value) {
566  return toString16(toString(value));
567 }
568 
572 template <typename T> inline std::u16string toString16(const std::complex<T> & value) {
573  return toString16(value.real(), " + j", value.imag());
574 }
575 
579 inline std::u16string toString16(bool value) {
580  return value ? u"true" : u"false";
581 }
582 
586 inline std::u16string toString16(const char * value) {
587  return toString16(toString((value)));
588 }
589 
593 inline std::u16string toString16(const char16_t * value) {
594  return std::u16string(value);
595 }
596 
600 inline std::u16string toString16(const char32_t * value) {
601  return toString16(toString32(value));
602 }
603 
610 inline std::u16string toString16(const void * ptr) {
611  return toString16((size_t) ptr);
612 }
613 
620 inline std::u16string toString16(std::nullptr_t) {
621  return u"0";
622 }
623 
627 inline std::u16string toString16(std::type_index value) {
628  return toString16(value.name());
629 }
630 
634 inline std::u16string toString16(const std::function<std::u16string ()> & f) {
635  return f();
636 }
637 
641 template <typename F, typename S>
642 inline std::u16string toString16(const std::pair<F, S> & p) {
643  return std::u16string(u"{ ") + toString16(p.first) + u", " + toString16(p.second) + u" }";
644 }
645 
651 template <typename ... T, template <typename ...> class C>
652 inline std::u16string toString16Helper(const C<T ...> & c) {
653  std::u16string builder = u"{";
654  std::u16string prefix = u" ";
655  bool empty = true;
656 
657  for (const auto & e : c) {
658  builder += prefix + toString16(e);
659  prefix = u", ";
660  empty = false;
661  }
662 
663  if (!empty) {
664  builder += u" ";
665  }
666 
667  builder += u"}";
668 
669  return builder;
670 }
671 
675 #define BALAU_CONTAINER1_TO_STRING16(CONTAINER_TYPE) \
676  template <typename T> \
677  inline std::u16string toString16(const CONTAINER_TYPE<T> & c) { \
678  return toString16Helper(c); \
679  }
680 
684 #define BALAU_CONTAINER2_TO_STRING16(CONTAINER_TYPE) \
685  template <typename T, typename U> \
686  inline std::u16string toString16(const CONTAINER_TYPE<T, U> & c) { \
687  return toString16Helper(c); \
688  }
689 
693 #define BALAU_CONTAINER3_TO_STRING16(CONTAINER_TYPE) \
694  template <typename T, typename U, typename V> \
695  inline std::u16string toString16(const CONTAINER_TYPE<T, U, V> & c) { \
696  return toString16Helper(c); \
697  }
698 
702 #define BALAU_CONTAINER4_TO_STRING16(CONTAINER_TYPE) \
703  template <typename T, typename U, typename V, typename W> \
704  inline std::u16string toString16(const CONTAINER_TYPE<T, U, V, W> & c) { \
705  return toString16Helper(c); \
706  }
707 
711 #define BALAU_CONTAINER5_TO_STRING16(CONTAINER_TYPE) \
712  template <typename T, typename U, typename V, typename W, typename X> \
713  inline std::u16string toString16(const CONTAINER_TYPE<T, U, V, W, X> & c) { \
714  return toString16Helper(c); \
715  }
716 
718 BALAU_CONTAINER2_TO_STRING16(std::forward_list)
721 BALAU_CONTAINER3_TO_STRING16(std::multiset)
722 BALAU_CONTAINER4_TO_STRING16(std::multimap)
723 BALAU_CONTAINER3_TO_STRING16(std::priority_queue)
727 BALAU_CONTAINER5_TO_STRING16(std::unordered_map)
728 BALAU_CONTAINER5_TO_STRING16(std::unordered_multimap)
729 BALAU_CONTAINER4_TO_STRING16(std::unordered_multiset)
730 BALAU_CONTAINER3_TO_STRING16(std::unordered_set)
731 BALAU_CONTAINER2_TO_STRING16(std::vector)
732 
733 template <typename P1, typename P2, typename ... P>
740 inline std::u16string toString16(const P1 & p1, const P2 & p2, const P & ... p) {
741  return toString16(p1) + toString16(p2) + (std::u16string() + ... + toString16(p));
742 }
743 
745 
749 inline std::u32string toString32(const std::string & value) {
750  return boost::locale::conv::utf_to_utf<char32_t, char>(value);
751 }
752 
756 inline std::u32string toString32(const std::string_view & value) {
757  return toString32(std::string(value));
758 }
759 
760 #ifndef BALAU_USE_BOOST_STRING_VIEW
761 
765 inline std::u32string toString32(const boost::string_view & value) {
766  return toString32(value.to_string());
767 }
768 
769 #endif
770 
774 inline std::u32string toString32(const std::u16string & value) {
775  return boost::locale::conv::utf_to_utf<char32_t, char16_t>(value);
776 }
777 
781 inline std::u32string toString32(const std::u32string & value) {
782  return value;
783 }
784 
788 inline std::u32string toString32(const std::u32string_view & value) {
789  return std::u32string(value);
790 }
791 
795 inline std::u32string toString32(char value) {
796  std::string str;
797  str += value;
798  return toString32(str);
799 }
800 
804 inline std::u32string toString32(char16_t & value) {
805  std::u16string str;
806  str += value;
807  return toString32(str);
808 }
809 
813 inline std::u32string toString32(char32_t & value) {
814  std::u32string str;
815  str += value;
816  return str;
817 }
818 
822 inline std::u32string toString32(signed char value) {
823  return toString32(toString(value));
824 }
825 
829 inline std::u32string toString32(short value) {
830  return toString32(toString(value));
831 }
832 
836 inline std::u32string toString32(int value) {
837  return toString32(toString(value));
838 }
839 
843 inline std::u32string toString32(long value) {
844  return toString32(toString(value));
845 }
846 
850 inline std::u32string toString32(long long value) {
851  return toString32(toString(value));
852 }
853 
857 inline std::u32string toString32(unsigned char value) {
858  return toString32(toString(value));
859 }
860 
864 inline std::u32string toString32(unsigned short value) {
865  return toString32(toString(value));
866 }
867 
871 inline std::u32string toString32(unsigned int value) {
872  return toString32(toString(value));
873 }
874 
878 inline std::u32string toString32(unsigned long value) {
879  return toString32(toString(value));
880 }
881 
885 inline std::u32string toString32(unsigned long long value) {
886  return toString32(toString(value));
887 }
888 
892 inline std::u32string toString32(float value) {
893  return toString32(toString(value));
894 }
895 
899 inline std::u32string toString32(double value) {
900  return toString32(toString(value));
901 }
902 
906 inline std::u32string toString32(long double value) {
907  return toString32(toString(value));
908 }
909 
913 template <typename T> inline std::u32string toString32(const std::complex<T> & value) {
914  return toString32(value.real(), " + j", value.imag());
915 }
916 
920 inline std::u32string toString32(bool value) {
921  return value ? U"true" : U"false";
922 }
923 
927 inline std::u32string toString32(const char * value) {
928  return toString32(toString((value)));
929 }
930 
934 inline std::u32string toString32(const char16_t * value) {
935  return toString32(toString16((value)));
936 }
937 
941 inline std::u32string toString32(const char32_t * value) {
942  return std::u32string(value);
943 }
944 
951 inline std::u32string toString32(const void * ptr) {
952  return toString32((size_t) ptr);
953 }
954 
961 inline std::u32string toString32(std::nullptr_t) {
962  return U"0";
963 }
964 
968 inline std::u32string toString32(std::type_index value) {
969  return toString32(value.name());
970 }
971 
975 inline std::u32string toString32(const std::function<std::u32string ()> & f) {
976  return f();
977 }
978 
982 template <typename F, typename S>
983 inline std::u32string toString32(const std::pair<F, S> & p) {
984  return std::u32string(U"{ ") + toString32(p.first) + U", " + toString32(p.second) + U" }";
985 }
986 
992 template <typename ... T, template <typename ...> class C>
993 inline std::u32string toString32Helper(const C<T ...> & c) {
994  std::u32string builder = U"{";
995  std::u32string prefix = U" ";
996  bool empty = true;
997 
998  for (const auto & e : c) {
999  builder += prefix + toString32(e);
1000  prefix = U", ";
1001  empty = false;
1002  }
1003 
1004  if (!empty) {
1005  builder += U" ";
1006  }
1007 
1008  builder += U"}";
1009 
1010  return builder;
1011 }
1012 
1016 #define BALAU_CONTAINER1_TO_STRING32(CONTAINER_TYPE) \
1017  template <typename T> \
1018  inline std::u32string toString32(const CONTAINER_TYPE<T> & c) { \
1019  return toString32Helper(c); \
1020  }
1021 
1025 #define BALAU_CONTAINER2_TO_STRING32(CONTAINER_TYPE) \
1026  template <typename T, typename U> \
1027  inline std::u32string toString32(const CONTAINER_TYPE<T, U> & c) { \
1028  return toString32Helper(c); \
1029  }
1030 
1034 #define BALAU_CONTAINER3_TO_STRING32(CONTAINER_TYPE) \
1035  template <typename T, typename U, typename V> \
1036  inline std::u32string toString32(const CONTAINER_TYPE<T, U, V> & c) { \
1037  return toString32Helper(c); \
1038  }
1039 
1043 #define BALAU_CONTAINER4_TO_STRING32(CONTAINER_TYPE) \
1044  template <typename T, typename U, typename V, typename W> \
1045  inline std::u32string toString32(const CONTAINER_TYPE<T, U, V, W> & c) { \
1046  return toString32Helper(c); \
1047  }
1048 
1052 #define BALAU_CONTAINER5_TO_STRING32(CONTAINER_TYPE) \
1053  template <typename T, typename U, typename V, typename W, typename X> \
1054  inline std::u32string toString32(const CONTAINER_TYPE<T, U, V, W, X> & c) { \
1055  return toString32Helper(c); \
1056  }
1057 
1058 BALAU_CONTAINER2_TO_STRING32(std::deque)
1059 BALAU_CONTAINER2_TO_STRING32(std::forward_list)
1062 BALAU_CONTAINER3_TO_STRING32(std::multiset)
1063 BALAU_CONTAINER4_TO_STRING32(std::multimap)
1064 BALAU_CONTAINER3_TO_STRING32(std::priority_queue)
1065 BALAU_CONTAINER2_TO_STRING32(std::queue)
1067 BALAU_CONTAINER2_TO_STRING32(std::stack)
1068 BALAU_CONTAINER5_TO_STRING32(std::unordered_map)
1069 BALAU_CONTAINER5_TO_STRING32(std::unordered_multimap)
1070 BALAU_CONTAINER4_TO_STRING32(std::unordered_multiset)
1071 BALAU_CONTAINER3_TO_STRING32(std::unordered_set)
1072 BALAU_CONTAINER2_TO_STRING32(std::vector)
1073 
1074 template <typename P1, typename P2, typename ... P>
1081 inline std::u32string toString32(const P1 & p1, const P2 & p2, const P & ... p) {
1082  return toString32(p1) + toString32(p2) + (std::u32string() + ... + toString32(p));
1083 }
1084 
1086 
1092 template <> struct ToString<char, std::allocator<char>> {
1093  template <typename T> std::string operator () (const T & object) const {
1094  return toString(object);
1095  }
1096 };
1097 
1103 template <> struct ToString<char16_t, std::allocator<char16_t>> {
1104  template <typename T> std::u16string operator () (const T & object) const {
1105  return toString16(object);
1106  }
1107 };
1108 
1114 template <> struct ToString<char32_t, std::allocator<char32_t>> {
1115  template <typename T> std::u32string operator () (const T & object) const {
1116  return toString32(object);
1117  }
1118 };
1119 
1120 #endif // COM_BORA_SOFTWARE__BALAU_APPLICATION__TO_STRING_S
#define BALAU_CONTAINER3_TO_STRING32(CONTAINER_TYPE)
Define a UTF-32 to-string function for a container that has three template parameters.
Definition: ToStringS.hpp:1034
#define BALAU_CONTAINER5_TO_STRING(CONTAINER_TYPE)
Define a UTF-8 to-string function for a container that has five template parameters.
Definition: ToStringS.hpp:361
#define BALAU_CONTAINER2_TO_STRING16(CONTAINER_TYPE)
Define a UTF-16 to-string function for a container that has two template parameters.
Definition: ToStringS.hpp:684
#define BALAU_CONTAINER3_TO_STRING(CONTAINER_TYPE)
Define a UTF-8 to-string function for a container that has three template parameters.
Definition: ToStringS.hpp:343
#define BALAU_CONTAINER4_TO_STRING32(CONTAINER_TYPE)
Define a UTF-32 to-string function for a container that has four template parameters.
Definition: ToStringS.hpp:1043
STL namespace.
#define BALAU_CONTAINER4_TO_STRING(CONTAINER_TYPE)
Define a UTF-8 to-string function for a container that has four template parameters.
Definition: ToStringS.hpp:352
#define BALAU_CONTAINER5_TO_STRING16(CONTAINER_TYPE)
Define a UTF-16 to-string function for a container that has five template parameters.
Definition: ToStringS.hpp:711
std::u32string toString32Helper(const C< T ... > &c)
Helper for container to UTF-8 string functions.
Definition: ToStringS.hpp:993
std::string toStringHelper(const C< T ... > &c)
Helper for container to UTF-8 string functions.
Definition: ToStringS.hpp:302
#define BALAU_CONTAINER4_TO_STRING16(CONTAINER_TYPE)
Define a UTF-16 to-string function for a container that has four template parameters.
Definition: ToStringS.hpp:702
#define BALAU_CONTAINER5_TO_STRING32(CONTAINER_TYPE)
Define a UTF-32 to-string function for a container that has five template parameters.
Definition: ToStringS.hpp:1052
Core includes, typedefs and functions.
#define BALAU_CONTAINER3_TO_STRING16(CONTAINER_TYPE)
Define a UTF-16 to-string function for a container that has three template parameters.
Definition: ToStringS.hpp:693
#define BALAU_CONTAINER2_TO_STRING32(CONTAINER_TYPE)
Define a UTF-32 to-string function for a container that has two template parameters.
Definition: ToStringS.hpp:1025
std::u32string toString32(const P1 &p1, const P2 &p2, const P &... p)
Concatenates the to-string values of the input arguments.
Definition: ToStringS.hpp:1081
std::string toString(const P1 &p1, const P2 &p2, const P &... p)
Concatenates the to-string values of the input arguments.
Definition: ToStringS.hpp:399
#define BALAU_CONTAINER2_TO_STRING(CONTAINER_TYPE)
Define a UTF-8 to-string function for a container that has two template parameters.
Definition: ToStringS.hpp:334
std::u16string toString16(const P1 &p1, const P2 &p2, const P &... p)
Concatenates the to-string values of the input arguments.
Definition: ToStringS.hpp:740
Template class based to-string function for use in template classes.
Definition: ToStringA.hpp:1278
std::u16string toString16Helper(const C< T ... > &c)
Helper for container to UTF-16 string functions.
Definition: ToStringS.hpp:652