xtd 0.2.0
as.h
Go to the documentation of this file.
1 #pragma once
4 #include "any.h"
5 #include "convert.h"
6 #include "convert_pointer.h"
7 #include "convert_string.h"
9 #include "types.h"
10 #define __XTD_CORE_INTERNAL__
11 #include "internal/__as_enum.h"
12 #undef __XTD_CORE_INTERNAL__
13 #include <memory>
14 
16 namespace xtd {
17  // ___________________________________________________________________________________________
18  // generic
19 
36  template<typename new_type_t>
37  new_type_t as(std::any value) {
38  try {
39  return std::any_cast<new_type_t>(value);
40  } catch (const std::exception& e) {
41  throw invalid_cast_exception(e.what(), csf_);
42  }
43  }
44 
60  template<typename new_type_t>
61  new_type_t as(bool value) {
62  return static_cast<new_type_t>(value);
63  }
64 
80  template<typename new_type_t>
81  new_type_t as(xtd::byte value) {
82  return static_cast<new_type_t>(value);
83  }
84 
100  template<typename new_type_t>
101  new_type_t as(char value) {
102  return static_cast<new_type_t>(value);
103  }
104 
105 #if defined(__cpp_lib_char8_t)
106  template<typename new_type_t>
122  new_type_t as(char8 value) {
123  return static_cast<new_type_t>(value);
124  }
125 #endif
126 
142  template<typename new_type_t>
143  new_type_t as(char16 value) {
144  return static_cast<new_type_t>(value);
145  }
146 
162  template<typename new_type_t>
163  new_type_t as(char32 value) {
164  return static_cast<new_type_t>(value);
165  }
166 
182  template<typename new_type_t>
183  new_type_t as(wchar value) {
184  return static_cast<new_type_t>(value);
185  }
186 
202  template<typename new_type_t>
203  new_type_t as(decimal value) {
204  return static_cast<new_type_t>(value);
205  }
206 
222  template<typename new_type_t>
223  new_type_t as(double value) {
224  return static_cast<new_type_t>(value);
225  }
226 
242  template<typename new_type_t>
243  new_type_t as(float value) {
244  return static_cast<new_type_t>(value);
245  }
246 
262  template<typename new_type_t>
263  new_type_t as(int16 value) {
264  return static_cast<new_type_t>(value);
265  }
266 
282  template<typename new_type_t>
283  new_type_t as(int32 value) {
284  return static_cast<new_type_t>(value);
285  }
286 
302  template<typename new_type_t>
303  new_type_t as(int64 value) {
304  return static_cast<new_type_t>(value);
305  }
306 
322  template<typename new_type_t>
323  new_type_t as(slong value) {
324  return static_cast<new_type_t>(value);
325  }
326 
342  template<typename new_type_t>
343  new_type_t as(sbyte value) {
344  return static_cast<new_type_t>(value);
345  }
346 
362  template<typename new_type_t>
363  new_type_t as(uint16 value) {
364  return static_cast<new_type_t>(value);
365  }
366 
382  template<typename new_type_t>
383  new_type_t as(uint32 value) {
384  return static_cast<new_type_t>(value);
385  }
386 
402  template<typename new_type_t>
403  new_type_t as(uint64 value) {
404  return static_cast<new_type_t>(value);
405  }
406 
422  template<typename new_type_t>
423  new_type_t as(xtd::ulong value) {
424  return static_cast<new_type_t>(value);
425  }
426 
443  template<typename new_type_t>
444  new_type_t as(const xtd::ustring& value) {
445  try {
446  return dynamic_cast<const new_type_t&>(value);
447  } catch (const std::exception& e) {
448  throw invalid_cast_exception(e.what(), csf_);
449  }
450  throw std::bad_cast();
451  }
452 
469  template<typename new_type_t>
470  new_type_t as(xtd::ustring& value) {
471  try {
472  return dynamic_cast<new_type_t&>(value);
473  } catch (const std::exception& e) {
474  throw invalid_cast_exception(e.what(), csf_);
475  }
476  throw std::bad_cast();
477  }
478 
480  template<typename new_type_t>
481  new_type_t as(const xtd::ustring& value, xtd::byte from_base) {
483  }
484  template<typename new_type_t>
485  new_type_t as(xtd::byte value, xtd::byte from_base) {
487  }
488  template<typename new_type_t>
489  new_type_t as(int16 value, xtd::byte from_base) {
491  }
492  template<typename new_type_t>
493  new_type_t as(int32 value, xtd::byte from_base) {
495  }
496  template<typename new_type_t>
497  new_type_t as(int64 value, xtd::byte from_base) {
499  }
500  template<typename new_type_t>
501  new_type_t as(slong value, xtd::byte from_base) {
503  }
504  template<typename new_type_t>
505  new_type_t as(sbyte value, xtd::byte from_base) {
507  }
508  template<typename new_type_t>
509  new_type_t as(uint16 value, xtd::byte from_base) {
511  }
512  template<typename new_type_t>
513  new_type_t as(uint32 value, xtd::byte from_base) {
515  }
516  template<typename new_type_t>
517  new_type_t as(uint64 value, xtd::byte from_base) {
519  }
520  template<typename new_type_t>
521  new_type_t as(xtd::ulong value, xtd::byte from_base) {
523  }
525 
537  template<typename new_type_t>
538  new_type_t as(const std::string& value) {
539  try {
540  return dynamic_cast<const new_type_t&>(value);
541  } catch (const std::exception& e) {
542  throw invalid_cast_exception(e.what(), csf_);
543  }
544  throw std::bad_cast();
545  }
546 
558  template<typename new_type_t>
559  new_type_t as(std::string& value) {
560  try {
561  return dynamic_cast<new_type_t&>(value);
562  } catch (const std::exception& e) {
563  throw invalid_cast_exception(e.what(), csf_);
564  }
565  throw std::bad_cast();
566  }
567 
568 #if defined(__cpp_lib_char8_t)
569  template<typename new_type_t>
581  new_type_t as(const std::u8string& value) {
582  try {
583  return dynamic_cast<const new_type_t&>(value);
584  } catch (const std::exception& e) {
585  throw invalid_cast_exception(e.what(), csf_);
586  }
587  throw std::bad_cast();
588  }
589 
601  template<typename new_type_t>
602  new_type_t as(std::u8string& value) {
603  try {
604  return dynamic_cast<new_type_t&>(value);
605  } catch (const std::exception& e) {
606  throw invalid_cast_exception(e.what(), csf_);
607  }
608  throw std::bad_cast();
609  }
610 #endif
611 
623  template<typename new_type_t>
624  new_type_t as(const std::u16string& value) {
625  try {
626  return dynamic_cast<const new_type_t&>(value);
627  } catch (const std::exception& e) {
628  throw invalid_cast_exception(e.what(), csf_);
629  }
630  throw std::bad_cast();
631  }
632 
644  template<typename new_type_t>
645  new_type_t as(std::u16string& value) {
646  try {
647  return dynamic_cast<new_type_t&>(value);
648  } catch (const std::exception& e) {
649  throw invalid_cast_exception(e.what(), csf_);
650  }
651  throw std::bad_cast();
652  }
653 
665  template<typename new_type_t>
666  new_type_t as(const std::u32string& value) {
667  try {
668  return dynamic_cast<const new_type_t&>(value);
669  } catch (const std::exception& e) {
670  throw invalid_cast_exception(e.what(), csf_);
671  }
672  throw std::bad_cast();
673  }
674 
686  template<typename new_type_t>
687  new_type_t as(std::u32string& value) {
688  try {
689  return dynamic_cast<new_type_t&>(value);
690  } catch (const std::exception& e) {
691  throw invalid_cast_exception(e.what(), csf_);
692  }
693  throw std::bad_cast();
694  }
695 
707  template<typename new_type_t>
708  new_type_t as(const std::wstring& value) {
709  try {
710  return dynamic_cast<const new_type_t&>(value);
711  } catch (const std::exception& e) {
712  throw invalid_cast_exception(e.what(), csf_);
713  }
714  throw std::bad_cast();
715  }
716 
728  template<typename new_type_t>
729  new_type_t as(std::wstring& value) {
730  try {
731  return dynamic_cast<new_type_t&>(value);
732  } catch (const std::exception& e) {
733  throw invalid_cast_exception(e.what(), csf_);
734  }
735  throw std::bad_cast();
736  }
737 
753  template<typename new_type_t>
754  new_type_t as(const char* value) {
755  return reinterpret_cast<new_type_t>(value);
756  }
757 
773  template<typename new_type_t>
774  new_type_t as(char* value) {
775  return reinterpret_cast<new_type_t>(value);
776  }
777 
778 #if defined(__cpp_lib_char8_t)
779  template<typename new_type_t>
795  new_type_t as(const char8* value) {
796  return reinterpret_cast<new_type_t>(value);
797  }
798 
814  template<typename new_type_t>
815  new_type_t as(char8* value) {
816  return reinterpret_cast<new_type_t>(value);
817  }
818 #endif
819 
835  template<typename new_type_t>
836  new_type_t as(const char16* value) {
837  return reinterpret_cast<new_type_t>(value);
838  }
839 
855  template<typename new_type_t>
856  new_type_t as(char16* value) {
857  return reinterpret_cast<new_type_t>(value);
858  }
859 
875  template<typename new_type_t>
876  new_type_t as(const char32* value) {
877  return reinterpret_cast<new_type_t>(value);
878  }
879 
895  template<typename new_type_t>
896  new_type_t as(char32* value) {
897  return reinterpret_cast<new_type_t>(value);
898  }
899 
915  template<typename new_type_t>
916  new_type_t as(const wchar* value) {
917  return reinterpret_cast<new_type_t>(value);
918  }
919 
935  template<typename new_type_t>
936  new_type_t as(wchar* value) {
937  return reinterpret_cast<new_type_t>(value);
938  }
939 
940  // ___________________________________________________________________________________________
941  // xtd::convert specialization
942 
959  template<>
960  inline bool as<bool>(std::any value) {
961  return xtd::convert::to_boolean(value);
962  }
963 
979  template<>
980  inline bool as<bool>(bool value) {
981  return xtd::convert::to_boolean(value);
982  }
983 
999  template<>
1000  inline bool as<bool>(xtd::byte value) {
1001  return xtd::convert::to_boolean(value);
1002  }
1003 
1020  template<>
1021  inline bool as<bool>(char value) {
1022  return xtd::convert::to_boolean(value);
1023  }
1024 
1025 #if defined(__cpp_lib_char8_t)
1026  template<>
1043  inline bool as<bool>(char8 value) {
1044  return xtd::convert::to_boolean(value);
1045  }
1046 #endif
1047 
1064  template<>
1065  inline bool as<bool>(char16 value) {
1066  return xtd::convert::to_boolean(value);
1067  }
1068 
1085  template<>
1086  inline bool as<bool>(char32 value) {
1087  return xtd::convert::to_boolean(value);
1088  }
1089 
1106  template<>
1107  inline bool as<bool>(wchar value) {
1108  return xtd::convert::to_boolean(value);
1109  }
1110 
1126  template<>
1127  inline bool as<bool>(decimal value) {
1128  return xtd::convert::to_boolean(value);
1129  }
1130 
1146  template<>
1147  inline bool as<bool>(double value) {
1148  return xtd::convert::to_boolean(value);
1149  }
1150 
1166  template<>
1167  inline bool as<bool>(float value) {
1168  return xtd::convert::to_boolean(value);
1169  }
1170 
1186  template<>
1187  inline bool as<bool>(int16 value) {
1188  return xtd::convert::to_boolean(value);
1189  }
1190 
1206  template<>
1207  inline bool as<bool>(int32 value) {
1208  return xtd::convert::to_boolean(value);
1209  }
1210 
1226  template<>
1227  inline bool as<bool>(int64 value) {
1228  return xtd::convert::to_boolean(value);
1229  }
1230 
1246  template<>
1247  inline bool as<bool>(slong value) {
1248  return xtd::convert::to_boolean(value);
1249  }
1250 
1266  template<>
1267  inline bool as<bool>(sbyte value) {
1268  return xtd::convert::to_boolean(value);
1269  }
1270 
1286  template<>
1287  inline bool as<bool>(uint16 value) {
1288  return xtd::convert::to_boolean(value);
1289  }
1290 
1306  template<>
1307  inline bool as<bool>(uint32 value) {
1308  return xtd::convert::to_boolean(value);
1309  }
1310 
1326  template<>
1327  inline bool as<bool>(uint64 value) {
1328  return xtd::convert::to_boolean(value);
1329  }
1330 
1346  template<>
1347  inline bool as<bool>(xtd::ulong value) {
1348  return xtd::convert::to_boolean(value);
1349  }
1350 
1367  template<>
1368  inline bool as<bool>(const xtd::ustring& value) {
1369  return xtd::convert::to_boolean(value);
1370  }
1371 
1388  template<>
1389  inline bool as<bool>(const std::string& value) {
1390  return xtd::convert::to_boolean(value);
1391  }
1392 
1393 #if defined(__cpp_lib_char8_t)
1394  template<>
1411  inline bool as<bool>(const std::u8string& value) {
1412  return xtd::convert::to_boolean(value);
1413  }
1414 #endif
1415 
1432  template<>
1433  inline bool as<bool>(const std::u16string& value) {
1434  return xtd::convert::to_boolean(value);
1435  }
1436 
1453  template<>
1454  inline bool as<bool>(const std::u32string& value) {
1455  return xtd::convert::to_boolean(value);
1456  }
1457 
1474  template<>
1475  inline bool as<bool>(const std::wstring& value) {
1476  return xtd::convert::to_boolean(value);
1477  }
1478 
1495  template<>
1496  inline bool as<bool>(const char* value) {
1497  return xtd::convert::to_boolean(value);
1498  }
1499 
1516  template<>
1517  inline bool as<bool>(char* value) {
1518  return xtd::convert::to_boolean(value);
1519  }
1520 
1521 #if defined(__cpp_lib_char8_t)
1522  template<>
1539  inline bool as<bool>(const char8* value) {
1540  return xtd::convert::to_boolean(value);
1541  }
1542 
1559  template<>
1560  inline bool as<bool>(char8* value) {
1561  return xtd::convert::to_boolean(value);
1562  }
1563 #endif
1564 
1581  template<>
1582  inline bool as<bool>(const char16* value) {
1583  return xtd::convert::to_boolean(value);
1584  }
1585 
1602  template<>
1603  inline bool as<bool>(char16* value) {
1604  return xtd::convert::to_boolean(value);
1605  }
1606 
1623  template<>
1624  inline bool as<bool>(const char32* value) {
1625  return xtd::convert::to_boolean(value);
1626  }
1627 
1644  template<>
1645  inline bool as<bool>(char32* value) {
1646  return xtd::convert::to_boolean(value);
1647  }
1648 
1665  template<>
1666  inline bool as<bool>(const wchar* value) {
1667  return xtd::convert::to_boolean(value);
1668  }
1669 
1686  template<>
1687  inline bool as<bool>(wchar* value) {
1688  return xtd::convert::to_boolean(value);
1689  }
1690 
1707  template<>
1708  inline xtd::byte as<xtd::byte>(std::any value) {
1709  return xtd::convert::to_byte(value);
1710  }
1711 
1727  template<>
1728  inline xtd::byte as<xtd::byte>(bool value) {
1729  return xtd::convert::to_byte(value);
1730  }
1731 
1747  template<>
1748  inline xtd::byte as<xtd::byte>(xtd::byte value) {
1749  return xtd::convert::to_byte(value);
1750  }
1751 
1768  template<>
1769  inline xtd::byte as<xtd::byte>(char value) {
1770  return xtd::convert::to_byte(value);
1771  }
1772 
1773 #if defined(__cpp_lib_char8_t)
1774  template<>
1791  inline xtd::byte as<xtd::byte>(char8 value) {
1792  return xtd::convert::to_byte(value);
1793  }
1794 #endif
1795 
1812  template<>
1813  inline xtd::byte as<xtd::byte>(char16 value) {
1814  return xtd::convert::to_byte(value);
1815  }
1816 
1833  template<>
1834  inline xtd::byte as<xtd::byte>(char32 value) {
1835  return xtd::convert::to_byte(value);
1836  }
1837 
1854  template<>
1855  inline xtd::byte as<xtd::byte>(wchar value) {
1856  return xtd::convert::to_byte(value);
1857  }
1858 
1874  template<>
1875  inline xtd::byte as<xtd::byte>(decimal value) {
1876  return xtd::convert::to_byte(value);
1877  }
1878 
1894  template<>
1895  inline xtd::byte as<xtd::byte>(double value) {
1896  return xtd::convert::to_byte(value);
1897  }
1898 
1914  template<>
1915  inline xtd::byte as<xtd::byte>(float value) {
1916  return xtd::convert::to_byte(value);
1917  }
1918 
1934  template<>
1935  inline xtd::byte as<xtd::byte>(int16 value) {
1936  return xtd::convert::to_byte(value);
1937  }
1938 
1954  template<>
1955  inline xtd::byte as<xtd::byte>(int32 value) {
1956  return xtd::convert::to_byte(value);
1957  }
1958 
1974  template<>
1975  inline xtd::byte as<xtd::byte>(int64 value) {
1976  return xtd::convert::to_byte(value);
1977  }
1978 
1994  template<>
1995  inline xtd::byte as<xtd::byte>(slong value) {
1996  return xtd::convert::to_byte(value);
1997  }
1998 
2014  template<>
2015  inline xtd::byte as<xtd::byte>(sbyte value) {
2016  return xtd::convert::to_byte(value);
2017  }
2018 
2034  template<>
2035  inline xtd::byte as<xtd::byte>(uint16 value) {
2036  return xtd::convert::to_byte(value);
2037  }
2038 
2054  template<>
2055  inline xtd::byte as<xtd::byte>(uint32 value) {
2056  return xtd::convert::to_byte(value);
2057  }
2058 
2074  template<>
2075  inline xtd::byte as<xtd::byte>(uint64 value) {
2076  return xtd::convert::to_byte(value);
2077  }
2078 
2094  template<>
2095  inline xtd::byte as<xtd::byte>(xtd::ulong value) {
2096  return xtd::convert::to_byte(value);
2097  }
2098 
2115  template<>
2116  inline xtd::byte as<xtd::byte>(const xtd::ustring& value) {
2117  return xtd::convert::to_byte(value);
2118  }
2119 
2137  template<>
2138  inline xtd::byte as<xtd::byte>(const xtd::ustring& value, xtd::byte from_base) {
2139  return xtd::convert::to_byte(value, from_base);
2140  }
2141 
2158  template<>
2159  inline xtd::byte as<xtd::byte>(const std::string& value) {
2160  return xtd::convert::to_byte(value);
2161  }
2162 
2163 #if defined(__cpp_lib_char8_t)
2164  template<>
2181  inline xtd::byte as<xtd::byte>(const std::u8string& value) {
2182  return xtd::convert::to_byte(value);
2183  }
2184 #endif
2185 
2202  template<>
2203  inline xtd::byte as<xtd::byte>(const std::u16string& value) {
2204  return xtd::convert::to_byte(value);
2205  }
2206 
2223  template<>
2224  inline xtd::byte as<xtd::byte>(const std::u32string& value) {
2225  return xtd::convert::to_byte(value);
2226  }
2227 
2244  template<>
2245  inline xtd::byte as<xtd::byte>(const std::wstring& value) {
2246  return xtd::convert::to_byte(value);
2247  }
2248 
2265  template<>
2266  inline xtd::byte as<xtd::byte>(const char* value) {
2267  return xtd::convert::to_byte(value);
2268  }
2269 
2286  template<>
2287  inline xtd::byte as<xtd::byte>(char* value) {
2288  return xtd::convert::to_byte(value);
2289  }
2290 
2291 #if defined(__cpp_lib_char8_t)
2292  template<>
2309  inline xtd::byte as<xtd::byte>(const char8* value) {
2310  return xtd::convert::to_byte(value);
2311  }
2312 
2329  template<>
2330  inline xtd::byte as<xtd::byte>(char8* value) {
2331  return xtd::convert::to_byte(value);
2332  }
2333 #endif
2334 
2351  template<>
2352  inline xtd::byte as<xtd::byte>(const char16* value) {
2353  return xtd::convert::to_byte(value);
2354  }
2355 
2372  template<>
2373  inline xtd::byte as<xtd::byte>(char16* value) {
2374  return xtd::convert::to_byte(value);
2375  }
2376 
2393  template<>
2394  inline xtd::byte as<xtd::byte>(const char32* value) {
2395  return xtd::convert::to_byte(value);
2396  }
2397 
2414  template<>
2415  inline xtd::byte as<xtd::byte>(char32* value) {
2416  return xtd::convert::to_byte(value);
2417  }
2418 
2435  template<>
2436  inline xtd::byte as<xtd::byte>(const wchar* value) {
2437  return xtd::convert::to_byte(value);
2438  }
2439 
2456  template<>
2457  inline xtd::byte as<xtd::byte>(wchar* value) {
2458  return xtd::convert::to_byte(value);
2459  }
2460 
2477  template<>
2478  inline char as<char>(std::any value) {
2479  return xtd::convert::to_char(value);
2480  }
2481 
2497  template<>
2498  inline char as<char>(bool value) {
2499  return xtd::convert::to_char(value);
2500  }
2501 
2517  template<>
2518  inline char as<char>(xtd::byte value) {
2519  return xtd::convert::to_char(value);
2520  }
2521 
2538  template<>
2539  inline char as<char>(char value) {
2540  return xtd::convert::to_char(value);
2541  }
2542 
2543 #if defined(__cpp_lib_char8_t)
2544  template<>
2561  inline char as<char>(char8 value) {
2562  return xtd::convert::to_char(value);
2563  }
2564 #endif
2565 
2582  template<>
2583  inline char as<char>(char16 value) {
2584  return xtd::convert::to_char(value);
2585  }
2586 
2603  template<>
2604  inline char as<char>(char32 value) {
2605  return xtd::convert::to_char(value);
2606  }
2607 
2624  template<>
2625  inline char as<char>(wchar value) {
2626  return xtd::convert::to_char(value);
2627  }
2628 
2644  template<>
2645  inline char as<char>(decimal value) {
2646  return xtd::convert::to_char(value);
2647  }
2648 
2664  template<>
2665  inline char as<char>(double value) {
2666  return xtd::convert::to_char(value);
2667  }
2668 
2684  template<>
2685  inline char as<char>(float value) {
2686  return xtd::convert::to_char(value);
2687  }
2688 
2704  template<>
2705  inline char as<char>(int16 value) {
2706  return xtd::convert::to_char(value);
2707  }
2708 
2724  template<>
2725  inline char as<char>(int32 value) {
2726  return xtd::convert::to_char(value);
2727  }
2728 
2744  template<>
2745  inline char as<char>(int64 value) {
2746  return xtd::convert::to_char(value);
2747  }
2748 
2764  template<>
2765  inline char as<char>(slong value) {
2766  return xtd::convert::to_char(value);
2767  }
2768 
2784  template<>
2785  inline char as<char>(sbyte value) {
2786  return xtd::convert::to_char(value);
2787  }
2788 
2804  template<>
2805  inline char as<char>(uint16 value) {
2806  return xtd::convert::to_char(value);
2807  }
2808 
2824  template<>
2825  inline char as<char>(uint32 value) {
2826  return xtd::convert::to_char(value);
2827  }
2828 
2844  template<>
2845  inline char as<char>(uint64 value) {
2846  return xtd::convert::to_char(value);
2847  }
2848 
2864  template<>
2865  inline char as<char>(xtd::ulong value) {
2866  return xtd::convert::to_char(value);
2867  }
2868 
2885  template<>
2886  inline char as<char>(const xtd::ustring& value) {
2887  return xtd::convert::to_char(value);
2888  }
2889 
2906  template<>
2907  inline char as<char>(const std::string& value) {
2908  return xtd::convert::to_char(value);
2909  }
2910 
2911 #if defined(__cpp_lib_char8_t)
2912  template<>
2929  inline char as<char>(const std::u8string& value) {
2930  return xtd::convert::to_char(value);
2931  }
2932 #endif
2933 
2950  template<>
2951  inline char as<char>(const std::u16string& value) {
2952  return xtd::convert::to_char(value);
2953  }
2954 
2971  template<>
2972  inline char as<char>(const std::u32string& value) {
2973  return xtd::convert::to_char(value);
2974  }
2975 
2992  template<>
2993  inline char as<char>(const std::wstring& value) {
2994  return xtd::convert::to_char(value);
2995  }
2996 
3013  template<>
3014  inline char as<char>(const char* value) {
3015  return xtd::convert::to_char(value);
3016  }
3017 
3034  template<>
3035  inline char as<char>(char* value) {
3036  return xtd::convert::to_char(value);
3037  }
3038 
3039 #if defined(__cpp_lib_char8_t)
3040  template<>
3057  inline char as<char>(const char8* value) {
3058  return xtd::convert::to_char(value);
3059  }
3060 
3077  template<>
3078  inline char as<char>(char8* value) {
3079  return xtd::convert::to_char(value);
3080  }
3081 #endif
3082 
3099  template<>
3100  inline char as<char>(const char16* value) {
3101  return xtd::convert::to_char(value);
3102  }
3103 
3120  template<>
3121  inline char as<char>(char16* value) {
3122  return xtd::convert::to_char(value);
3123  }
3124 
3141  template<>
3142  inline char as<char>(const char32* value) {
3143  return xtd::convert::to_char(value);
3144  }
3145 
3162  template<>
3163  inline char as<char>(char32* value) {
3164  return xtd::convert::to_char(value);
3165  }
3166 
3183  template<>
3184  inline char as<char>(const wchar* value) {
3185  return xtd::convert::to_char(value);
3186  }
3187 
3204  template<>
3205  inline char as<char>(wchar* value) {
3206  return xtd::convert::to_char(value);
3207  }
3208 
3209 #if defined(__cpp_lib_char8_t)
3210  template<>
3227  inline char8 as<char8>(std::any value) {
3228  return xtd::convert::to_char8(value);
3229  }
3230 
3246  template<>
3247  inline char8 as<char8>(bool value) {
3248  return xtd::convert::to_char8(value);
3249  }
3250 
3266  template<>
3267  inline char8 as<char8>(xtd::byte value) {
3268  return xtd::convert::to_char8(value);
3269  }
3270 
3287  template<>
3288  inline char8 as<char8>(char value) {
3289  return xtd::convert::to_char8(value);
3290  }
3291 
3308  template<>
3309  inline char8 as<char8>(char8 value) {
3310  return xtd::convert::to_char8(value);
3311  }
3312 
3329  template<>
3330  inline char8 as<char8>(char16 value) {
3331  return xtd::convert::to_char8(value);
3332  }
3333 
3350  template<>
3351  inline char8 as<char8>(char32 value) {
3352  return xtd::convert::to_char8(value);
3353  }
3354 
3371  template<>
3372  inline char8 as<char8>(wchar value) {
3373  return xtd::convert::to_char8(value);
3374  }
3375 
3391  template<>
3392  inline char8 as<char8>(decimal value) {
3393  return xtd::convert::to_char8(value);
3394  }
3395 
3411  template<>
3412  inline char8 as<char8>(double value) {
3413  return xtd::convert::to_char8(value);
3414  }
3415 
3431  template<>
3432  inline char8 as<char8>(float value) {
3433  return xtd::convert::to_char8(value);
3434  }
3435 
3451  template<>
3452  inline char8 as<char8>(int16 value) {
3453  return xtd::convert::to_char8(value);
3454  }
3455 
3471  template<>
3472  inline char8 as<char8>(int32 value) {
3473  return xtd::convert::to_char8(value);
3474  }
3475 
3491  template<>
3492  inline char8 as<char8>(int64 value) {
3493  return xtd::convert::to_char8(value);
3494  }
3495 
3511  template<>
3512  inline char8 as<char8>(slong value) {
3513  return xtd::convert::to_char8(value);
3514  }
3515 
3531  template<>
3532  inline char8 as<char8>(sbyte value) {
3533  return xtd::convert::to_char8(value);
3534  }
3535 
3551  template<>
3552  inline char8 as<char8>(uint16 value) {
3553  return xtd::convert::to_char8(value);
3554  }
3555 
3571  template<>
3572  inline char8 as<char8>(uint32 value) {
3573  return xtd::convert::to_char8(value);
3574  }
3575 
3591  template<>
3592  inline char8 as<char8>(uint64 value) {
3593  return xtd::convert::to_char8(value);
3594  }
3595 
3611  template<>
3612  inline char8 as<char8>(xtd::ulong value) {
3613  return xtd::convert::to_char8(value);
3614  }
3615 
3632  template<>
3633  inline char8 as<char8>(const xtd::ustring& value) {
3634  return xtd::convert::to_char8(value);
3635  }
3636 
3653  template<>
3654  inline char8 as<char8>(const std::string& value) {
3655  return xtd::convert::to_char8(value);
3656  }
3657 
3674  template<>
3675  inline char8 as<char8>(const std::u8string& value) {
3676  return xtd::convert::to_char8(value);
3677  }
3678 
3695  template<>
3696  inline char8 as<char8>(const std::u16string& value) {
3697  return xtd::convert::to_char8(value);
3698  }
3699 
3716  template<>
3717  inline char8 as<char8>(const std::u32string& value) {
3718  return xtd::convert::to_char8(value);
3719  }
3720 
3737  template<>
3738  inline char8 as<char8>(const std::wstring& value) {
3739  return xtd::convert::to_char8(value);
3740  }
3741 
3758  template<>
3759  inline char8 as<char8>(const char* value) {
3760  return xtd::convert::to_char8(value);
3761  }
3762 
3779  template<>
3780  inline char8 as<char8>(char* value) {
3781  return xtd::convert::to_char8(value);
3782  }
3783 
3800  template<>
3801  inline char8 as<char8>(const char8* value) {
3802  return xtd::convert::to_char8(value);
3803  }
3804 
3821  template<>
3822  inline char8 as<char8>(char8* value) {
3823  return xtd::convert::to_char8(value);
3824  }
3825 
3842  template<>
3843  inline char8 as<char8>(const char16* value) {
3844  return xtd::convert::to_char8(value);
3845  }
3846 
3863  template<>
3864  inline char8 as<char8>(char16* value) {
3865  return xtd::convert::to_char8(value);
3866  }
3867 
3884  template<>
3885  inline char8 as<char8>(const char32* value) {
3886  return xtd::convert::to_char8(value);
3887  }
3888 
3905  template<>
3906  inline char8 as<char8>(char32* value) {
3907  return xtd::convert::to_char8(value);
3908  }
3909 
3926  template<>
3927  inline char8 as<char8>(const wchar* value) {
3928  return xtd::convert::to_char8(value);
3929  }
3930 
3947  template<>
3948  inline char8 as<char8>(wchar* value) {
3949  return xtd::convert::to_char8(value);
3950  }
3951 #endif
3952 
3969  template<>
3970  inline char16 as<char16>(std::any value) {
3971  return xtd::convert::to_char16(value);
3972  }
3973 
3989  template<>
3990  inline char16 as<char16>(bool value) {
3991  return xtd::convert::to_char16(value);
3992  }
3993 
4009  template<>
4010  inline char16 as<char16>(xtd::byte value) {
4011  return xtd::convert::to_char16(value);
4012  }
4013 
4030  template<>
4031  inline char16 as<char16>(char value) {
4032  return xtd::convert::to_char16(value);
4033  }
4034 
4035 #if defined(__cpp_lib_char8_t)
4036  template<>
4053  inline char16 as<char16>(char8 value) {
4054  return xtd::convert::to_char16(value);
4055  }
4056 #endif
4057 
4074  template<>
4075  inline char16 as<char16>(char16 value) {
4076  return xtd::convert::to_char16(value);
4077  }
4078 
4095  template<>
4096  inline char16 as<char16>(char32 value) {
4097  return xtd::convert::to_char16(value);
4098  }
4099 
4116  template<>
4117  inline char16 as<char16>(wchar value) {
4118  return xtd::convert::to_char16(value);
4119  }
4120 
4136  template<>
4137  inline char16 as<char16>(decimal value) {
4138  return xtd::convert::to_char16(value);
4139  }
4140 
4156  template<>
4157  inline char16 as<char16>(double value) {
4158  return xtd::convert::to_char16(value);
4159  }
4160 
4176  template<>
4177  inline char16 as<char16>(float value) {
4178  return xtd::convert::to_char16(value);
4179  }
4180 
4196  template<>
4197  inline char16 as<char16>(int16 value) {
4198  return xtd::convert::to_char16(value);
4199  }
4200 
4216  template<>
4217  inline char16 as<char16>(int32 value) {
4218  return xtd::convert::to_char16(value);
4219  }
4220 
4236  template<>
4237  inline char16 as<char16>(int64 value) {
4238  return xtd::convert::to_char16(value);
4239  }
4240 
4256  template<>
4257  inline char16 as<char16>(slong value) {
4258  return xtd::convert::to_char16(value);
4259  }
4260 
4276  template<>
4277  inline char16 as<char16>(sbyte value) {
4278  return xtd::convert::to_char16(value);
4279  }
4280 
4296  template<>
4297  inline char16 as<char16>(uint16 value) {
4298  return xtd::convert::to_char16(value);
4299  }
4300 
4316  template<>
4317  inline char16 as<char16>(uint32 value) {
4318  return xtd::convert::to_char16(value);
4319  }
4320 
4336  template<>
4337  inline char16 as<char16>(uint64 value) {
4338  return xtd::convert::to_char16(value);
4339  }
4340 
4356  template<>
4357  inline char16 as<char16>(xtd::ulong value) {
4358  return xtd::convert::to_char16(value);
4359  }
4360 
4377  template<>
4378  inline char16 as<char16>(const xtd::ustring& value) {
4379  return xtd::convert::to_char16(value);
4380  }
4381 
4398  template<>
4399  inline char16 as<char16>(const std::string& value) {
4400  return xtd::convert::to_char16(value);
4401  }
4402 
4403 #if defined(__cpp_lib_char8_t)
4404  template<>
4421  inline char16 as<char16>(const std::u8string& value) {
4422  return xtd::convert::to_char16(value);
4423  }
4424 #endif
4425 
4442  template<>
4443  inline char16 as<char16>(const std::u16string& value) {
4444  return xtd::convert::to_char16(value);
4445  }
4446 
4463  template<>
4464  inline char16 as<char16>(const std::u32string& value) {
4465  return xtd::convert::to_char16(value);
4466  }
4467 
4484  template<>
4485  inline char16 as<char16>(const std::wstring& value) {
4486  return xtd::convert::to_char16(value);
4487  }
4488 
4505  template<>
4506  inline char16 as<char16>(const char* value) {
4507  return xtd::convert::to_char16(value);
4508  }
4509 
4526  template<>
4527  inline char16 as<char16>(char* value) {
4528  return xtd::convert::to_char16(value);
4529  }
4530 
4531 #if defined(__cpp_lib_char8_t)
4532  template<>
4549  inline char16 as<char16>(const char8* value) {
4550  return xtd::convert::to_char16(value);
4551  }
4552 
4569  template<>
4570  inline char16 as<char16>(char8* value) {
4571  return xtd::convert::to_char16(value);
4572  }
4573 #endif
4574 
4591  template<>
4592  inline char16 as<char16>(const char16* value) {
4593  return xtd::convert::to_char16(value);
4594  }
4595 
4612  template<>
4613  inline char16 as<char16>(char16* value) {
4614  return xtd::convert::to_char16(value);
4615  }
4616 
4633  template<>
4634  inline char16 as<char16>(const char32* value) {
4635  return xtd::convert::to_char16(value);
4636  }
4637 
4654  template<>
4655  inline char16 as<char16>(char32* value) {
4656  return xtd::convert::to_char16(value);
4657  }
4658 
4675  template<>
4676  inline char16 as<char16>(const wchar* value) {
4677  return xtd::convert::to_char16(value);
4678  }
4679 
4696  template<>
4697  inline char16 as<char16>(wchar* value) {
4698  return xtd::convert::to_char16(value);
4699  }
4700 
4717  template<>
4718  inline char32 as<char32>(std::any value) {
4719  return xtd::convert::to_char32(value);
4720  }
4721 
4737  template<>
4738  inline char32 as<char32>(bool value) {
4739  return xtd::convert::to_char32(value);
4740  }
4741 
4757  template<>
4758  inline char32 as<char32>(xtd::byte value) {
4759  return xtd::convert::to_char32(value);
4760  }
4761 
4778  template<>
4779  inline char32 as<char32>(char value) {
4780  return xtd::convert::to_char32(value);
4781  }
4782 
4783 #if defined(__cpp_lib_char8_t)
4784  template<>
4801  inline char32 as<char32>(char8 value) {
4802  return xtd::convert::to_char32(value);
4803  }
4804 #endif
4805 
4822  template<>
4823  inline char32 as<char32>(char16 value) {
4824  return xtd::convert::to_char32(value);
4825  }
4826 
4843  template<>
4844  inline char32 as<char32>(char32 value) {
4845  return xtd::convert::to_char32(value);
4846  }
4847 
4864  template<>
4865  inline char32 as<char32>(wchar value) {
4866  return xtd::convert::to_char32(value);
4867  }
4868 
4884  template<>
4885  inline char32 as<char32>(decimal value) {
4886  return xtd::convert::to_char32(value);
4887  }
4888 
4904  template<>
4905  inline char32 as<char32>(double value) {
4906  return xtd::convert::to_char32(value);
4907  }
4908 
4924  template<>
4925  inline char32 as<char32>(float value) {
4926  return xtd::convert::to_char32(value);
4927  }
4928 
4944  template<>
4945  inline char32 as<char32>(int16 value) {
4946  return xtd::convert::to_char32(value);
4947  }
4948 
4964  template<>
4965  inline char32 as<char32>(int32 value) {
4966  return xtd::convert::to_char32(value);
4967  }
4968 
4984  template<>
4985  inline char32 as<char32>(int64 value) {
4986  return xtd::convert::to_char32(value);
4987  }
4988 
5004  template<>
5005  inline char32 as<char32>(slong value) {
5006  return xtd::convert::to_char32(value);
5007  }
5008 
5024  template<>
5025  inline char32 as<char32>(sbyte value) {
5026  return xtd::convert::to_char32(value);
5027  }
5028 
5044  template<>
5045  inline char32 as<char32>(uint16 value) {
5046  return xtd::convert::to_char32(value);
5047  }
5048 
5064  template<>
5065  inline char32 as<char32>(uint32 value) {
5066  return xtd::convert::to_char32(value);
5067  }
5068 
5084  template<>
5085  inline char32 as<char32>(uint64 value) {
5086  return xtd::convert::to_char32(value);
5087  }
5088 
5104  template<>
5105  inline char32 as<char32>(xtd::ulong value) {
5106  return xtd::convert::to_char32(value);
5107  }
5108 
5125  template<>
5126  inline char32 as<char32>(const xtd::ustring& value) {
5127  return xtd::convert::to_char32(value);
5128  }
5129 
5146  template<>
5147  inline char32 as<char32>(const std::string& value) {
5148  return xtd::convert::to_char32(value);
5149  }
5150 
5151 #if defined(__cpp_lib_char8_t)
5152  template<>
5169  inline char32 as<char32>(const std::u8string& value) {
5170  return xtd::convert::to_char32(value);
5171  }
5172 #endif
5173 
5190  template<>
5191  inline char32 as<char32>(const std::u16string& value) {
5192  return xtd::convert::to_char32(value);
5193  }
5194 
5211  template<>
5212  inline char32 as<char32>(const std::u32string& value) {
5213  return xtd::convert::to_char32(value);
5214  }
5215 
5232  template<>
5233  inline char32 as<char32>(const std::wstring& value) {
5234  return xtd::convert::to_char32(value);
5235  }
5236 
5253  template<>
5254  inline char32 as<char32>(const char* value) {
5255  return xtd::convert::to_char32(value);
5256  }
5257 
5274  template<>
5275  inline char32 as<char32>(char* value) {
5276  return xtd::convert::to_char32(value);
5277  }
5278 
5279 #if defined(__cpp_lib_char8_t)
5280  template<>
5297  inline char32 as<char32>(const char8* value) {
5298  return xtd::convert::to_char32(value);
5299  }
5300 
5317  template<>
5318  inline char32 as<char32>(char8* value) {
5319  return xtd::convert::to_char32(value);
5320  }
5321 #endif
5322 
5339  template<>
5340  inline char32 as<char32>(const char16* value) {
5341  return xtd::convert::to_char32(value);
5342  }
5343 
5360  template<>
5361  inline char32 as<char32>(char16* value) {
5362  return xtd::convert::to_char32(value);
5363  }
5364 
5381  template<>
5382  inline char32 as<char32>(const char32* value) {
5383  return xtd::convert::to_char32(value);
5384  }
5385 
5402  template<>
5403  inline char32 as<char32>(char32* value) {
5404  return xtd::convert::to_char32(value);
5405  }
5406 
5423  template<>
5424  inline char32 as<char32>(const wchar* value) {
5425  return xtd::convert::to_char32(value);
5426  }
5427 
5444  template<>
5445  inline char32 as<char32>(wchar* value) {
5446  return xtd::convert::to_char32(value);
5447  }
5448 
5465  template<>
5466  inline wchar as<wchar>(std::any value) {
5467  return xtd::convert::to_wchar(value);
5468  }
5469 
5485  template<>
5486  inline wchar as<wchar>(bool value) {
5487  return xtd::convert::to_wchar(value);
5488  }
5489 
5505  template<>
5506  inline wchar as<wchar>(xtd::byte value) {
5507  return xtd::convert::to_wchar(value);
5508  }
5509 
5526  template<>
5527  inline wchar as<wchar>(char value) {
5528  return xtd::convert::to_wchar(value);
5529  }
5530 
5531 #if defined(__cpp_lib_char8_t)
5532  template<>
5549  inline wchar as<wchar>(char8 value) {
5550  return xtd::convert::to_wchar(value);
5551  }
5552 #endif
5553 
5570  template<>
5571  inline wchar as<wchar>(char16 value) {
5572  return xtd::convert::to_wchar(value);
5573  }
5574 
5591  template<>
5592  inline wchar as<wchar>(char32 value) {
5593  return xtd::convert::to_wchar(value);
5594  }
5595 
5612  template<>
5613  inline wchar as<wchar>(wchar value) {
5614  return xtd::convert::to_wchar(value);
5615  }
5616 
5632  template<>
5633  inline wchar as<wchar>(decimal value) {
5634  return xtd::convert::to_wchar(value);
5635  }
5636 
5652  template<>
5653  inline wchar as<wchar>(double value) {
5654  return xtd::convert::to_wchar(value);
5655  }
5656 
5672  template<>
5673  inline wchar as<wchar>(float value) {
5674  return xtd::convert::to_wchar(value);
5675  }
5676 
5692  template<>
5693  inline wchar as<wchar>(int16 value) {
5694  return xtd::convert::to_wchar(value);
5695  }
5696 
5712  template<>
5713  inline wchar as<wchar>(int32 value) {
5714  return xtd::convert::to_wchar(value);
5715  }
5716 
5732  template<>
5733  inline wchar as<wchar>(int64 value) {
5734  return xtd::convert::to_wchar(value);
5735  }
5736 
5752  template<>
5753  inline wchar as<wchar>(slong value) {
5754  return xtd::convert::to_wchar(value);
5755  }
5756 
5772  template<>
5773  inline wchar as<wchar>(sbyte value) {
5774  return xtd::convert::to_wchar(value);
5775  }
5776 
5792  template<>
5793  inline wchar as<wchar>(uint16 value) {
5794  return xtd::convert::to_wchar(value);
5795  }
5796 
5812  template<>
5813  inline wchar as<wchar>(uint32 value) {
5814  return xtd::convert::to_wchar(value);
5815  }
5816 
5832  template<>
5833  inline wchar as<wchar>(uint64 value) {
5834  return xtd::convert::to_wchar(value);
5835  }
5836 
5852  template<>
5853  inline wchar as<wchar>(xtd::ulong value) {
5854  return xtd::convert::to_wchar(value);
5855  }
5856 
5873  template<>
5874  inline wchar as<wchar>(const xtd::ustring& value) {
5875  return xtd::convert::to_wchar(value);
5876  }
5877 
5894  template<>
5895  inline wchar as<wchar>(const std::string& value) {
5896  return xtd::convert::to_wchar(value);
5897  }
5898 
5899 #if defined(__cpp_lib_char8_t)
5900  template<>
5917  inline wchar as<wchar>(const std::u8string& value) {
5918  return xtd::convert::to_wchar(value);
5919  }
5920 #endif
5921 
5938  template<>
5939  inline wchar as<wchar>(const std::u16string& value) {
5940  return xtd::convert::to_wchar(value);
5941  }
5942 
5959  template<>
5960  inline wchar as<wchar>(const std::u32string& value) {
5961  return xtd::convert::to_wchar(value);
5962  }
5963 
5980  template<>
5981  inline wchar as<wchar>(const std::wstring& value) {
5982  return xtd::convert::to_wchar(value);
5983  }
5984 
6001  template<>
6002  inline wchar as<wchar>(const char* value) {
6003  return xtd::convert::to_wchar(value);
6004  }
6005 
6022  template<>
6023  inline wchar as<wchar>(char* value) {
6024  return xtd::convert::to_wchar(value);
6025  }
6026 
6027 #if defined(__cpp_lib_char8_t)
6028  template<>
6045  inline wchar as<wchar>(const char8* value) {
6046  return xtd::convert::to_wchar(value);
6047  }
6048 
6065  template<>
6066  inline wchar as<wchar>(char8* value) {
6067  return xtd::convert::to_wchar(value);
6068  }
6069 #endif
6070 
6087  template<>
6088  inline wchar as<wchar>(const char16* value) {
6089  return xtd::convert::to_wchar(value);
6090  }
6091 
6108  template<>
6109  inline wchar as<wchar>(char16* value) {
6110  return xtd::convert::to_wchar(value);
6111  }
6112 
6129  template<>
6130  inline wchar as<wchar>(const char32* value) {
6131  return xtd::convert::to_wchar(value);
6132  }
6133 
6150  template<>
6151  inline wchar as<wchar>(char32* value) {
6152  return xtd::convert::to_wchar(value);
6153  }
6154 
6171  template<>
6172  inline wchar as<wchar>(const wchar* value) {
6173  return xtd::convert::to_wchar(value);
6174  }
6175 
6192  template<>
6193  inline wchar as<wchar>(wchar* value) {
6194  return xtd::convert::to_wchar(value);
6195  }
6196 
6213  template<>
6214  inline decimal as<decimal>(std::any value) {
6215  return xtd::convert::to_decimal(value);
6216  }
6217 
6233  template<>
6234  inline decimal as<decimal>(bool value) {
6235  return xtd::convert::to_decimal(value);
6236  }
6237 
6253  template<>
6255  return xtd::convert::to_decimal(value);
6256  }
6257 
6274  template<>
6275  inline decimal as<decimal>(char value) {
6276  return xtd::convert::to_decimal(value);
6277  }
6278 
6279 #if defined(__cpp_lib_char8_t)
6280  template<>
6297  inline decimal as<decimal>(char8 value) {
6298  return xtd::convert::to_decimal(value);
6299  }
6300 #endif
6301 
6318  template<>
6319  inline decimal as<decimal>(char16 value) {
6320  return xtd::convert::to_decimal(value);
6321  }
6322 
6339  template<>
6340  inline decimal as<decimal>(char32 value) {
6341  return xtd::convert::to_decimal(value);
6342  }
6343 
6360  template<>
6361  inline decimal as<decimal>(wchar value) {
6362  return xtd::convert::to_decimal(value);
6363  }
6364 
6380  template<>
6381  inline decimal as<decimal>(decimal value) {
6382  return xtd::convert::to_decimal(value);
6383  }
6384 
6400  template<>
6401  inline decimal as<decimal>(double value) {
6402  return xtd::convert::to_decimal(value);
6403  }
6404 
6420  template<>
6421  inline decimal as<decimal>(float value) {
6422  return xtd::convert::to_decimal(value);
6423  }
6424 
6440  template<>
6441  inline decimal as<decimal>(int16 value) {
6442  return xtd::convert::to_decimal(value);
6443  }
6444 
6460  template<>
6461  inline decimal as<decimal>(int32 value) {
6462  return xtd::convert::to_decimal(value);
6463  }
6464 
6480  template<>
6481  inline decimal as<decimal>(int64 value) {
6482  return xtd::convert::to_decimal(value);
6483  }
6484 
6500  template<>
6501  inline decimal as<decimal>(slong value) {
6502  return xtd::convert::to_decimal(value);
6503  }
6504 
6520  template<>
6521  inline decimal as<decimal>(sbyte value) {
6522  return xtd::convert::to_decimal(value);
6523  }
6524 
6540  template<>
6541  inline decimal as<decimal>(uint16 value) {
6542  return xtd::convert::to_decimal(value);
6543  }
6544 
6560  template<>
6561  inline decimal as<decimal>(uint32 value) {
6562  return xtd::convert::to_decimal(value);
6563  }
6564 
6580  template<>
6581  inline decimal as<decimal>(uint64 value) {
6582  return xtd::convert::to_decimal(value);
6583  }
6584 
6600  template<>
6602  return xtd::convert::to_decimal(value);
6603  }
6604 
6621  template<>
6622  inline decimal as<decimal>(const xtd::ustring& value) {
6623  return xtd::convert::to_decimal(value);
6624  }
6625 
6642  template<>
6643  inline decimal as<decimal>(const std::string& value) {
6644  return xtd::convert::to_decimal(value);
6645  }
6646 
6647 #if defined(__cpp_lib_char8_t)
6648  template<>
6665  inline decimal as<decimal>(const std::u8string& value) {
6666  return xtd::convert::to_decimal(value);
6667  }
6668 #endif
6669 
6686  template<>
6687  inline decimal as<decimal>(const std::u16string& value) {
6688  return xtd::convert::to_decimal(value);
6689  }
6690 
6707  template<>
6708  inline decimal as<decimal>(const std::u32string& value) {
6709  return xtd::convert::to_decimal(value);
6710  }
6711 
6728  template<>
6729  inline decimal as<decimal>(const std::wstring& value) {
6730  return xtd::convert::to_decimal(value);
6731  }
6732 
6749  template<>
6750  inline decimal as<decimal>(const char* value) {
6751  return xtd::convert::to_decimal(value);
6752  }
6753 
6770  template<>
6771  inline decimal as<decimal>(char* value) {
6772  return xtd::convert::to_decimal(value);
6773  }
6774 
6775 #if defined(__cpp_lib_char8_t)
6776  template<>
6793  inline decimal as<decimal>(const char8* value) {
6794  return xtd::convert::to_decimal(value);
6795  }
6796 
6813  template<>
6814  inline decimal as<decimal>(char8* value) {
6815  return xtd::convert::to_decimal(value);
6816  }
6817 #endif
6818 
6835  template<>
6836  inline decimal as<decimal>(const char16* value) {
6837  return xtd::convert::to_decimal(value);
6838  }
6839 
6856  template<>
6857  inline decimal as<decimal>(char16* value) {
6858  return xtd::convert::to_decimal(value);
6859  }
6860 
6877  template<>
6878  inline decimal as<decimal>(const char32* value) {
6879  return xtd::convert::to_decimal(value);
6880  }
6881 
6898  template<>
6899  inline decimal as<decimal>(char32* value) {
6900  return xtd::convert::to_decimal(value);
6901  }
6902 
6919  template<>
6920  inline decimal as<decimal>(const wchar* value) {
6921  return xtd::convert::to_decimal(value);
6922  }
6923 
6940  template<>
6941  inline decimal as<decimal>(wchar* value) {
6942  return xtd::convert::to_decimal(value);
6943  }
6944 
6961  template<>
6962  inline double as<double>(std::any value) {
6963  return xtd::convert::to_double(value);
6964  }
6965 
6981  template<>
6982  inline double as<double>(bool value) {
6983  return xtd::convert::to_double(value);
6984  }
6985 
7001  template<>
7002  inline double as<double>(xtd::byte value) {
7003  return xtd::convert::to_double(value);
7004  }
7005 
7022  template<>
7023  inline double as<double>(char value) {
7024  return xtd::convert::to_double(value);
7025  }
7026 
7027 #if defined(__cpp_lib_char8_t)
7028  template<>
7045  inline double as<double>(char8 value) {
7046  return xtd::convert::to_double(value);
7047  }
7048 #endif
7049 
7066  template<>
7067  inline double as<double>(char16 value) {
7068  return xtd::convert::to_double(value);
7069  }
7070 
7087  template<>
7088  inline double as<double>(char32 value) {
7089  return xtd::convert::to_double(value);
7090  }
7091 
7108  template<>
7109  inline double as<double>(wchar value) {
7110  return xtd::convert::to_double(value);
7111  }
7112 
7128  template<>
7129  inline double as<double>(decimal value) {
7130  return xtd::convert::to_double(value);
7131  }
7132 
7148  template<>
7149  inline double as<double>(double value) {
7150  return xtd::convert::to_double(value);
7151  }
7152 
7168  template<>
7169  inline double as<double>(float value) {
7170  return xtd::convert::to_double(value);
7171  }
7172 
7188  template<>
7189  inline double as<double>(int16 value) {
7190  return xtd::convert::to_double(value);
7191  }
7192 
7208  template<>
7209  inline double as<double>(int32 value) {
7210  return xtd::convert::to_double(value);
7211  }
7212 
7228  template<>
7229  inline double as<double>(int64 value) {
7230  return xtd::convert::to_double(value);
7231  }
7232 
7248  template<>
7249  inline double as<double>(slong value) {
7250  return xtd::convert::to_double(value);
7251  }
7252 
7268  template<>
7269  inline double as<double>(sbyte value) {
7270  return xtd::convert::to_double(value);
7271  }
7272 
7288  template<>
7289  inline double as<double>(uint16 value) {
7290  return xtd::convert::to_double(value);
7291  }
7292 
7308  template<>
7309  inline double as<double>(uint32 value) {
7310  return xtd::convert::to_double(value);
7311  }
7312 
7328  template<>
7329  inline double as<double>(uint64 value) {
7330  return xtd::convert::to_double(value);
7331  }
7332 
7348  template<>
7349  inline double as<double>(xtd::ulong value) {
7350  return xtd::convert::to_double(value);
7351  }
7352 
7369  template<>
7370  inline double as<double>(const xtd::ustring& value) {
7371  return xtd::convert::to_double(value);
7372  }
7373 
7390  template<>
7391  inline double as<double>(const std::string& value) {
7392  return xtd::convert::to_double(value);
7393  }
7394 
7395 #if defined(__cpp_lib_char8_t)
7396  template<>
7413  inline double as<double>(const std::u8string& value) {
7414  return xtd::convert::to_double(value);
7415  }
7416 #endif
7417 
7434  template<>
7435  inline double as<double>(const std::u16string& value) {
7436  return xtd::convert::to_double(value);
7437  }
7438 
7455  template<>
7456  inline double as<double>(const std::u32string& value) {
7457  return xtd::convert::to_double(value);
7458  }
7459 
7476  template<>
7477  inline double as<double>(const std::wstring& value) {
7478  return xtd::convert::to_double(value);
7479  }
7480 
7497  template<>
7498  inline double as<double>(const char* value) {
7499  return xtd::convert::to_double(value);
7500  }
7501 
7518  template<>
7519  inline double as<double>(char* value) {
7520  return xtd::convert::to_double(value);
7521  }
7522 
7523 #if defined(__cpp_lib_char8_t)
7524  template<>
7541  inline double as<double>(const char8* value) {
7542  return xtd::convert::to_double(value);
7543  }
7544 
7561  template<>
7562  inline double as<double>(char8* value) {
7563  return xtd::convert::to_double(value);
7564  }
7565 #endif
7566 
7583  template<>
7584  inline double as<double>(const char16* value) {
7585  return xtd::convert::to_double(value);
7586  }
7587 
7604  template<>
7605  inline double as<double>(char16* value) {
7606  return xtd::convert::to_double(value);
7607  }
7608 
7625  template<>
7626  inline double as<double>(const char32* value) {
7627  return xtd::convert::to_double(value);
7628  }
7629 
7646  template<>
7647  inline double as<double>(char32* value) {
7648  return xtd::convert::to_double(value);
7649  }
7650 
7667  template<>
7668  inline double as<double>(const wchar* value) {
7669  return xtd::convert::to_double(value);
7670  }
7671 
7688  template<>
7689  inline double as<double>(wchar* value) {
7690  return xtd::convert::to_double(value);
7691  }
7692 
7709  template<>
7710  inline float as<float>(std::any value) {
7711  return xtd::convert::to_single(value);
7712  }
7713 
7729  template<>
7730  inline float as<float>(bool value) {
7731  return xtd::convert::to_single(value);
7732  }
7733 
7749  template<>
7750  inline float as<float>(xtd::byte value) {
7751  return xtd::convert::to_single(value);
7752  }
7753 
7770  template<>
7771  inline float as<float>(char value) {
7772  return xtd::convert::to_single(value);
7773  }
7774 
7775 #if defined(__cpp_lib_char8_t)
7776  template<>
7793  inline float as<float>(char8 value) {
7794  return xtd::convert::to_single(value);
7795  }
7796 #endif
7797 
7814  template<>
7815  inline float as<float>(char16 value) {
7816  return xtd::convert::to_single(value);
7817  }
7818 
7835  template<>
7836  inline float as<float>(char32 value) {
7837  return xtd::convert::to_single(value);
7838  }
7839 
7856  template<>
7857  inline float as<float>(wchar value) {
7858  return xtd::convert::to_single(value);
7859  }
7860 
7876  template<>
7877  inline float as<float>(decimal value) {
7878  return xtd::convert::to_single(value);
7879  }
7880 
7896  template<>
7897  inline float as<float>(double value) {
7898  return xtd::convert::to_single(value);
7899  }
7900 
7916  template<>
7917  inline float as<float>(float value) {
7918  return xtd::convert::to_single(value);
7919  }
7920 
7936  template<>
7937  inline float as<float>(int16 value) {
7938  return xtd::convert::to_single(value);
7939  }
7940 
7956  template<>
7957  inline float as<float>(int32 value) {
7958  return xtd::convert::to_single(value);
7959  }
7960 
7976  template<>
7977  inline float as<float>(int64 value) {
7978  return xtd::convert::to_single(value);
7979  }
7980 
7996  template<>
7997  inline float as<float>(slong value) {
7998  return xtd::convert::to_single(value);
7999  }
8000 
8016  template<>
8017  inline float as<float>(sbyte value) {
8018  return xtd::convert::to_single(value);
8019  }
8020 
8036  template<>
8037  inline float as<float>(uint16 value) {
8038  return xtd::convert::to_single(value);
8039  }
8040 
8056  template<>
8057  inline float as<float>(uint32 value) {
8058  return xtd::convert::to_single(value);
8059  }
8060 
8076  template<>
8077  inline float as<float>(uint64 value) {
8078  return xtd::convert::to_single(value);
8079  }
8080 
8096  template<>
8097  inline float as<float>(xtd::ulong value) {
8098  return xtd::convert::to_single(value);
8099  }
8100 
8117  template<>
8118  inline float as<float>(const xtd::ustring& value) {
8119  return xtd::convert::to_single(value);
8120  }
8121 
8138  template<>
8139  inline float as<float>(const std::string& value) {
8140  return xtd::convert::to_single(value);
8141  }
8142 
8143 #if defined(__cpp_lib_char8_t)
8144  template<>
8161  inline float as<float>(const std::u8string& value) {
8162  return xtd::convert::to_single(value);
8163  }
8164 #endif
8165 
8182  template<>
8183  inline float as<float>(const std::u16string& value) {
8184  return xtd::convert::to_single(value);
8185  }
8186 
8203  template<>
8204  inline float as<float>(const std::u32string& value) {
8205  return xtd::convert::to_single(value);
8206  }
8207 
8224  template<>
8225  inline float as<float>(const std::wstring& value) {
8226  return xtd::convert::to_single(value);
8227  }
8228 
8245  template<>
8246  inline float as<float>(const char* value) {
8247  return xtd::convert::to_single(value);
8248  }
8249 
8266  template<>
8267  inline float as<float>(char* value) {
8268  return xtd::convert::to_single(value);
8269  }
8270 
8271 #if defined(__cpp_lib_char8_t)
8272  template<>
8289  inline float as<float>(const char8* value) {
8290  return xtd::convert::to_single(value);
8291  }
8292 
8309  template<>
8310  inline float as<float>(char8* value) {
8311  return xtd::convert::to_single(value);
8312  }
8313 #endif
8314 
8331  template<>
8332  inline float as<float>(const char16* value) {
8333  return xtd::convert::to_single(value);
8334  }
8335 
8352  template<>
8353  inline float as<float>(char16* value) {
8354  return xtd::convert::to_single(value);
8355  }
8356 
8373  template<>
8374  inline float as<float>(const char32* value) {
8375  return xtd::convert::to_single(value);
8376  }
8377 
8394  template<>
8395  inline float as<float>(char32* value) {
8396  return xtd::convert::to_single(value);
8397  }
8398 
8415  template<>
8416  inline float as<float>(const wchar* value) {
8417  return xtd::convert::to_single(value);
8418  }
8419 
8436  template<>
8437  inline float as<float>(wchar* value) {
8438  return xtd::convert::to_single(value);
8439  }
8440 
8457  template<>
8458  inline int16 as<int16>(std::any value) {
8459  return xtd::convert::to_int16(value);
8460  }
8461 
8477  template<>
8478  inline int16 as<int16>(bool value) {
8479  return xtd::convert::to_int16(value);
8480  }
8481 
8497  template<>
8498  inline int16 as<int16>(xtd::byte value) {
8499  return xtd::convert::to_int16(value);
8500  }
8501 
8518  template<>
8519  inline int16 as<int16>(char value) {
8520  return xtd::convert::to_int16(value);
8521  }
8522 
8523 #if defined(__cpp_lib_char8_t)
8524  template<>
8541  inline int16 as<int16>(char8 value) {
8542  return xtd::convert::to_int16(value);
8543  }
8544 #endif
8545 
8562  template<>
8563  inline int16 as<int16>(char16 value) {
8564  return xtd::convert::to_int16(value);
8565  }
8566 
8583  template<>
8584  inline int16 as<int16>(char32 value) {
8585  return xtd::convert::to_int16(value);
8586  }
8587 
8604  template<>
8605  inline int16 as<int16>(wchar value) {
8606  return xtd::convert::to_int16(value);
8607  }
8608 
8624  template<>
8625  inline int16 as<int16>(decimal value) {
8626  return xtd::convert::to_int16(value);
8627  }
8628 
8644  template<>
8645  inline int16 as<int16>(double value) {
8646  return xtd::convert::to_int16(value);
8647  }
8648 
8664  template<>
8665  inline int16 as<int16>(float value) {
8666  return xtd::convert::to_int16(value);
8667  }
8668 
8684  template<>
8685  inline int16 as<int16>(int16 value) {
8686  return xtd::convert::to_int16(value);
8687  }
8688 
8704  template<>
8705  inline int16 as<int16>(int32 value) {
8706  return xtd::convert::to_int16(value);
8707  }
8708 
8724  template<>
8725  inline int16 as<int16>(int64 value) {
8726  return xtd::convert::to_int16(value);
8727  }
8728 
8744  template<>
8745  inline int16 as<int16>(slong value) {
8746  return xtd::convert::to_int16(value);
8747  }
8748 
8764  template<>
8765  inline int16 as<int16>(sbyte value) {
8766  return xtd::convert::to_int16(value);
8767  }
8768 
8784  template<>
8785  inline int16 as<int16>(uint16 value) {
8786  return xtd::convert::to_int16(value);
8787  }
8788 
8804  template<>
8805  inline int16 as<int16>(uint32 value) {
8806  return xtd::convert::to_int16(value);
8807  }
8808 
8824  template<>
8825  inline int16 as<int16>(uint64 value) {
8826  return xtd::convert::to_int16(value);
8827  }
8828 
8844  template<>
8845  inline int16 as<int16>(xtd::ulong value) {
8846  return xtd::convert::to_int16(value);
8847  }
8848 
8865  template<>
8866  inline int16 as<int16>(const xtd::ustring& value) {
8867  return xtd::convert::to_int16(value);
8868  }
8869 
8887  template<>
8888  inline int16 as<int16>(const xtd::ustring& value, xtd::byte from_base) {
8889  return xtd::convert::to_int16(value, from_base);
8890  }
8891 
8908  template<>
8909  inline int16 as<int16>(const std::string& value) {
8910  return xtd::convert::to_int16(value);
8911  }
8912 
8913 #if defined(__cpp_lib_char8_t)
8914  template<>
8931  inline int16 as<int16>(const std::u8string& value) {
8932  return xtd::convert::to_int16(value);
8933  }
8934 #endif
8935 
8952  template<>
8953  inline int16 as<int16>(const std::u16string& value) {
8954  return xtd::convert::to_int16(value);
8955  }
8956 
8973  template<>
8974  inline int16 as<int16>(const std::u32string& value) {
8975  return xtd::convert::to_int16(value);
8976  }
8977 
8994  template<>
8995  inline int16 as<int16>(const std::wstring& value) {
8996  return xtd::convert::to_int16(value);
8997  }
8998 
9015  template<>
9016  inline int16 as<int16>(const char* value) {
9017  return xtd::convert::to_int16(value);
9018  }
9019 
9036  template<>
9037  inline int16 as<int16>(char* value) {
9038  return xtd::convert::to_int16(value);
9039  }
9040 
9041 #if defined(__cpp_lib_char8_t)
9042  template<>
9059  inline int16 as<int16>(const char8* value) {
9060  return xtd::convert::to_int16(value);
9061  }
9062 
9079  template<>
9080  inline int16 as<int16>(char8* value) {
9081  return xtd::convert::to_int16(value);
9082  }
9083 #endif
9084 
9101  template<>
9102  inline int16 as<int16>(const char16* value) {
9103  return xtd::convert::to_int16(value);
9104  }
9105 
9122  template<>
9123  inline int16 as<int16>(char16* value) {
9124  return xtd::convert::to_int16(value);
9125  }
9126 
9143  template<>
9144  inline int16 as<int16>(const char32* value) {
9145  return xtd::convert::to_int16(value);
9146  }
9147 
9164  template<>
9165  inline int16 as<int16>(char32* value) {
9166  return xtd::convert::to_int16(value);
9167  }
9168 
9185  template<>
9186  inline int16 as<int16>(const wchar* value) {
9187  return xtd::convert::to_int16(value);
9188  }
9189 
9206  template<>
9207  inline int16 as<int16>(wchar* value) {
9208  return xtd::convert::to_int16(value);
9209  }
9210 
9227  template<>
9228  inline int32 as<int32>(std::any value) {
9229  return xtd::convert::to_int32(value);
9230  }
9231 
9247  template<>
9248  inline int32 as<int32>(bool value) {
9249  return xtd::convert::to_int32(value);
9250  }
9251 
9267  template<>
9268  inline int32 as<int32>(xtd::byte value) {
9269  return xtd::convert::to_int32(value);
9270  }
9271 
9288  template<>
9289  inline int32 as<int32>(char value) {
9290  return xtd::convert::to_int32(value);
9291  }
9292 
9293 #if defined(__cpp_lib_char8_t)
9294  template<>
9311  inline int32 as<int32>(char8 value) {
9312  return xtd::convert::to_int32(value);
9313  }
9314 #endif
9315 
9332  template<>
9333  inline int32 as<int32>(char16 value) {
9334  return xtd::convert::to_int32(value);
9335  }
9336 
9353  template<>
9354  inline int32 as<int32>(char32 value) {
9355  return xtd::convert::to_int32(value);
9356  }
9357 
9374  template<>
9375  inline int32 as<int32>(wchar value) {
9376  return xtd::convert::to_int32(value);
9377  }
9378 
9394  template<>
9395  inline int32 as<int32>(decimal value) {
9396  return xtd::convert::to_int32(value);
9397  }
9398 
9414  template<>
9415  inline int32 as<int32>(double value) {
9416  return xtd::convert::to_int32(value);
9417  }
9418 
9434  template<>
9435  inline int32 as<int32>(float value) {
9436  return xtd::convert::to_int32(value);
9437  }
9438 
9454  template<>
9455  inline int32 as<int32>(int16 value) {
9456  return xtd::convert::to_int32(value);
9457  }
9458 
9474  template<>
9475  inline int32 as<int32>(int32 value) {
9476  return xtd::convert::to_int32(value);
9477  }
9478 
9494  template<>
9495  inline int32 as<int32>(int64 value) {
9496  return xtd::convert::to_int32(value);
9497  }
9498 
9514  template<>
9515  inline int32 as<int32>(slong value) {
9516  return xtd::convert::to_int32(value);
9517  }
9518 
9534  template<>
9535  inline int32 as<int32>(sbyte value) {
9536  return xtd::convert::to_int32(value);
9537  }
9538 
9554  template<>
9555  inline int32 as<int32>(uint16 value) {
9556  return xtd::convert::to_int32(value);
9557  }
9558 
9574  template<>
9575  inline int32 as<int32>(uint32 value) {
9576  return xtd::convert::to_int32(value);
9577  }
9578 
9594  template<>
9595  inline int32 as<int32>(uint64 value) {
9596  return xtd::convert::to_int32(value);
9597  }
9598 
9614  template<>
9615  inline int32 as<int32>(xtd::ulong value) {
9616  return xtd::convert::to_int32(value);
9617  }
9618 
9635  template<>
9636  inline int32 as<int32>(const xtd::ustring& value) {
9637  return xtd::convert::to_int32(value);
9638  }
9639 
9657  template<>
9658  inline int32 as<int32>(const xtd::ustring& value, xtd::byte from_base) {
9659  return xtd::convert::to_int32(value, from_base);
9660  }
9661 
9678  template<>
9679  inline int32 as<int32>(const std::string& value) {
9680  return xtd::convert::to_int32(value);
9681  }
9682 
9683 #if defined(__cpp_lib_char8_t)
9684  template<>
9701  inline int32 as<int32>(const std::u8string& value) {
9702  return xtd::convert::to_int32(value);
9703  }
9704 #endif
9705 
9722  template<>
9723  inline int32 as<int32>(const std::u16string& value) {
9724  return xtd::convert::to_int32(value);
9725  }
9726 
9743  template<>
9744  inline int32 as<int32>(const std::u32string& value) {
9745  return xtd::convert::to_int32(value);
9746  }
9747 
9764  template<>
9765  inline int32 as<int32>(const std::wstring& value) {
9766  return xtd::convert::to_int32(value);
9767  }
9768 
9785  template<>
9786  inline int32 as<int32>(const char* value) {
9787  return xtd::convert::to_int32(value);
9788  }
9789 
9806  template<>
9807  inline int32 as<int32>(char* value) {
9808  return xtd::convert::to_int32(value);
9809  }
9810 
9811 #if defined(__cpp_lib_char8_t)
9812  template<>
9829  inline int32 as<int32>(const char8* value) {
9830  return xtd::convert::to_int32(value);
9831  }
9832 
9849  template<>
9850  inline int32 as<int32>(char8* value) {
9851  return xtd::convert::to_int32(value);
9852  }
9853 #endif
9854 
9871  template<>
9872  inline int32 as<int32>(const char16* value) {
9873  return xtd::convert::to_int32(value);
9874  }
9875 
9892  template<>
9893  inline int32 as<int32>(char16* value) {
9894  return xtd::convert::to_int32(value);
9895  }
9896 
9913  template<>
9914  inline int32 as<int32>(const char32* value) {
9915  return xtd::convert::to_int32(value);
9916  }
9917 
9934  template<>
9935  inline int32 as<int32>(char32* value) {
9936  return xtd::convert::to_int32(value);
9937  }
9938 
9955  template<>
9956  inline int32 as<int32>(const wchar* value) {
9957  return xtd::convert::to_int32(value);
9958  }
9959 
9976  template<>
9977  inline int32 as<int32>(wchar* value) {
9978  return xtd::convert::to_int32(value);
9979  }
9980 
9997  template<>
9998  inline int64 as<int64>(std::any value) {
9999  return xtd::convert::to_int64(value);
10000  }
10001 
10017  template<>
10018  inline int64 as<int64>(bool value) {
10019  return xtd::convert::to_int64(value);
10020  }
10021 
10037  template<>
10038  inline int64 as<int64>(xtd::byte value) {
10039  return xtd::convert::to_int64(value);
10040  }
10041 
10058  template<>
10059  inline int64 as<int64>(char value) {
10060  return xtd::convert::to_int64(value);
10061  }
10062 
10063 #if defined(__cpp_lib_char8_t)
10064  template<>
10081  inline int64 as<int64>(char8 value) {
10082  return xtd::convert::to_int64(value);
10083  }
10084 #endif
10085 
10102  template<>
10103  inline int64 as<int64>(char16 value) {
10104  return xtd::convert::to_int64(value);
10105  }
10106 
10123  template<>
10124  inline int64 as<int64>(char32 value) {
10125  return xtd::convert::to_int64(value);
10126  }
10127 
10144  template<>
10145  inline int64 as<int64>(wchar value) {
10146  return xtd::convert::to_int64(value);
10147  }
10148 
10164  template<>
10165  inline int64 as<int64>(decimal value) {
10166  return xtd::convert::to_int64(value);
10167  }
10168 
10184  template<>
10185  inline int64 as<int64>(double value) {
10186  return xtd::convert::to_int64(value);
10187  }
10188 
10204  template<>
10205  inline int64 as<int64>(float value) {
10206  return xtd::convert::to_int64(value);
10207  }
10208 
10224  template<>
10225  inline int64 as<int64>(int16 value) {
10226  return xtd::convert::to_int64(value);
10227  }
10228 
10244  template<>
10245  inline int64 as<int64>(int32 value) {
10246  return xtd::convert::to_int64(value);
10247  }
10248 
10264  template<>
10265  inline int64 as<int64>(int64 value) {
10266  return xtd::convert::to_int64(value);
10267  }
10268 
10284  template<>
10285  inline int64 as<int64>(slong value) {
10286  return xtd::convert::to_int64(value);
10287  }
10288 
10304  template<>
10305  inline int64 as<int64>(sbyte value) {
10306  return xtd::convert::to_int64(value);
10307  }
10308 
10324  template<>
10325  inline int64 as<int64>(uint16 value) {
10326  return xtd::convert::to_int64(value);
10327  }
10328 
10344  template<>
10345  inline int64 as<int64>(uint32 value) {
10346  return xtd::convert::to_int64(value);
10347  }
10348 
10364  template<>
10365  inline int64 as<int64>(uint64 value) {
10366  return xtd::convert::to_int64(value);
10367  }
10368 
10384  template<>
10385  inline int64 as<int64>(xtd::ulong value) {
10386  return xtd::convert::to_int64(value);
10387  }
10388 
10405  template<>
10406  inline int64 as<int64>(const xtd::ustring& value) {
10407  return xtd::convert::to_int64(value);
10408  }
10409 
10427  template<>
10428  inline int64 as<int64>(const xtd::ustring& value, xtd::byte from_base) {
10429  return xtd::convert::to_int64(value, from_base);
10430  }
10431 
10448  template<>
10449  inline int64 as<int64>(const std::string& value) {
10450  return xtd::convert::to_int64(value);
10451  }
10452 
10453 #if defined(__cpp_lib_char8_t)
10454  template<>
10471  inline int64 as<int64>(const std::u8string& value) {
10472  return xtd::convert::to_int64(value);
10473  }
10474 #endif
10475 
10492  template<>
10493  inline int64 as<int64>(const std::u16string& value) {
10494  return xtd::convert::to_int64(value);
10495  }
10496 
10513  template<>
10514  inline int64 as<int64>(const std::u32string& value) {
10515  return xtd::convert::to_int64(value);
10516  }
10517 
10534  template<>
10535  inline int64 as<int64>(const std::wstring& value) {
10536  return xtd::convert::to_int64(value);
10537  }
10538 
10555  template<>
10556  inline int64 as<int64>(const char* value) {
10557  return xtd::convert::to_int64(value);
10558  }
10559 
10576  template<>
10577  inline int64 as<int64>(char* value) {
10578  return xtd::convert::to_int64(value);
10579  }
10580 
10581 #if defined(__cpp_lib_char8_t)
10582  template<>
10599  inline int64 as<int64>(const char8* value) {
10600  return xtd::convert::to_int64(value);
10601  }
10602 
10619  template<>
10620  inline int64 as<int64>(char8* value) {
10621  return xtd::convert::to_int64(value);
10622  }
10623 #endif
10624 
10641  template<>
10642  inline int64 as<int64>(const char16* value) {
10643  return xtd::convert::to_int64(value);
10644  }
10645 
10662  template<>
10663  inline int64 as<int64>(char16* value) {
10664  return xtd::convert::to_int64(value);
10665  }
10666 
10683  template<>
10684  inline int64 as<int64>(const char32* value) {
10685  return xtd::convert::to_int64(value);
10686  }
10687 
10704  template<>
10705  inline int64 as<int64>(char32* value) {
10706  return xtd::convert::to_int64(value);
10707  }
10708 
10725  template<>
10726  inline int64 as<int64>(const wchar* value) {
10727  return xtd::convert::to_int64(value);
10728  }
10729 
10746  template<>
10747  inline int64 as<int64>(wchar* value) {
10748  return xtd::convert::to_int64(value);
10749  }
10750 
10767  template<>
10768  inline slong as<slong>(std::any value) {
10769  return xtd::convert::to_llong(value);
10770  }
10771 
10787  template<>
10788  inline slong as<slong>(bool value) {
10789  return xtd::convert::to_llong(value);
10790  }
10791 
10807  template<>
10808  inline slong as<slong>(xtd::byte value) {
10809  return xtd::convert::to_llong(value);
10810  }
10811 
10828  template<>
10829  inline slong as<slong>(char value) {
10830  return xtd::convert::to_llong(value);
10831  }
10832 
10833 #if defined(__cpp_lib_char8_t)
10834  template<>
10851  inline slong as<slong>(char8 value) {
10852  return xtd::convert::to_llong(value);
10853  }
10854 #endif
10855 
10872  template<>
10873  inline slong as<slong>(char16 value) {
10874  return xtd::convert::to_llong(value);
10875  }
10876 
10893  template<>
10894  inline slong as<slong>(char32 value) {
10895  return xtd::convert::to_llong(value);
10896  }
10897 
10914  template<>
10915  inline slong as<slong>(wchar value) {
10916  return xtd::convert::to_llong(value);
10917  }
10918 
10934  template<>
10935  inline slong as<slong>(decimal value) {
10936  return xtd::convert::to_llong(value);
10937  }
10938 
10954  template<>
10955  inline slong as<slong>(double value) {
10956  return xtd::convert::to_llong(value);
10957  }
10958 
10974  template<>
10975  inline slong as<slong>(float value) {
10976  return xtd::convert::to_llong(value);
10977  }
10978 
10994  template<>
10995  inline slong as<slong>(int16 value) {
10996  return xtd::convert::to_llong(value);
10997  }
10998 
11014  template<>
11015  inline slong as<slong>(int32 value) {
11016  return xtd::convert::to_llong(value);
11017  }
11018 
11034  template<>
11035  inline slong as<slong>(int64 value) {
11036  return xtd::convert::to_llong(value);
11037  }
11038 
11054  template<>
11055  inline slong as<slong>(slong value) {
11056  return xtd::convert::to_llong(value);
11057  }
11058 
11074  template<>
11075  inline slong as<slong>(sbyte value) {
11076  return xtd::convert::to_llong(value);
11077  }
11078 
11094  template<>
11095  inline slong as<slong>(uint16 value) {
11096  return xtd::convert::to_llong(value);
11097  }
11098 
11114  template<>
11115  inline slong as<slong>(uint32 value) {
11116  return xtd::convert::to_llong(value);
11117  }
11118 
11134  template<>
11135  inline slong as<slong>(uint64 value) {
11136  return xtd::convert::to_llong(value);
11137  }
11138 
11154  template<>
11155  inline slong as<slong>(xtd::ulong value) {
11156  return xtd::convert::to_llong(value);
11157  }
11158 
11175  template<>
11176  inline slong as<slong>(const xtd::ustring& value) {
11177  return xtd::convert::to_llong(value);
11178  }
11179 
11197  template<>
11198  inline slong as<slong>(const xtd::ustring& value, xtd::byte from_base) {
11199  return xtd::convert::to_llong(value, from_base);
11200  }
11201 
11218  template<>
11219  inline slong as<slong>(const std::string& value) {
11220  return xtd::convert::to_llong(value);
11221  }
11222 
11223 #if defined(__cpp_lib_char8_t)
11224  template<>
11241  inline slong as<slong>(const std::u8string& value) {
11242  return xtd::convert::to_llong(value);
11243  }
11244 #endif
11245 
11262  template<>
11263  inline slong as<slong>(const std::u16string& value) {
11264  return xtd::convert::to_llong(value);
11265  }
11266 
11283  template<>
11284  inline slong as<slong>(const std::u32string& value) {
11285  return xtd::convert::to_llong(value);
11286  }
11287 
11304  template<>
11305  inline slong as<slong>(const std::wstring& value) {
11306  return xtd::convert::to_llong(value);
11307  }
11308 
11325  template<>
11326  inline slong as<slong>(const char* value) {
11327  return xtd::convert::to_llong(value);
11328  }
11329 
11346  template<>
11347  inline slong as<slong>(char* value) {
11348  return xtd::convert::to_llong(value);
11349  }
11350 
11351 #if defined(__cpp_lib_char8_t)
11352  template<>
11369  inline slong as<slong>(const char8* value) {
11370  return xtd::convert::to_llong(value);
11371  }
11372 
11389  template<>
11390  inline slong as<slong>(char8* value) {
11391  return xtd::convert::to_llong(value);
11392  }
11393 #endif
11394 
11411  template<>
11412  inline slong as<slong>(const char16* value) {
11413  return xtd::convert::to_llong(value);
11414  }
11415 
11432  template<>
11433  inline slong as<slong>(char16* value) {
11434  return xtd::convert::to_llong(value);
11435  }
11436 
11453  template<>
11454  inline slong as<slong>(const char32* value) {
11455  return xtd::convert::to_llong(value);
11456  }
11457 
11474  template<>
11475  inline slong as<slong>(char32* value) {
11476  return xtd::convert::to_llong(value);
11477  }
11478 
11495  template<>
11496  inline slong as<slong>(const wchar* value) {
11497  return xtd::convert::to_llong(value);
11498  }
11499 
11516  template<>
11517  inline slong as<slong>(wchar* value) {
11518  return xtd::convert::to_llong(value);
11519  }
11520 
11537  template<>
11538  inline sbyte as<sbyte>(std::any value) {
11539  return xtd::convert::to_sbyte(value);
11540  }
11541 
11557  template<>
11558  inline sbyte as<sbyte>(bool value) {
11559  return xtd::convert::to_sbyte(value);
11560  }
11561 
11577  template<>
11578  inline sbyte as<sbyte>(xtd::byte value) {
11579  return xtd::convert::to_sbyte(value);
11580  }
11581 
11598  template<>
11599  inline sbyte as<sbyte>(char value) {
11600  return xtd::convert::to_sbyte(value);
11601  }
11602 
11603 #if defined(__cpp_lib_char8_t)
11604  template<>
11621  inline sbyte as<sbyte>(char8 value) {
11622  return xtd::convert::to_sbyte(value);
11623  }
11624 #endif
11625 
11642  template<>
11643  inline sbyte as<sbyte>(char16 value) {
11644  return xtd::convert::to_sbyte(value);
11645  }
11646 
11663  template<>
11664  inline sbyte as<sbyte>(char32 value) {
11665  return xtd::convert::to_sbyte(value);
11666  }
11667 
11684  template<>
11685  inline sbyte as<sbyte>(wchar value) {
11686  return xtd::convert::to_sbyte(value);
11687  }
11688 
11704  template<>
11705  inline sbyte as<sbyte>(decimal value) {
11706  return xtd::convert::to_sbyte(value);
11707  }
11708 
11724  template<>
11725  inline sbyte as<sbyte>(double value) {
11726  return xtd::convert::to_sbyte(value);
11727  }
11728 
11744  template<>
11745  inline sbyte as<sbyte>(float value) {
11746  return xtd::convert::to_sbyte(value);
11747  }
11748 
11764  template<>
11765  inline sbyte as<sbyte>(int16 value) {
11766  return xtd::convert::to_sbyte(value);
11767  }
11768 
11784  template<>
11785  inline sbyte as<sbyte>(int32 value) {
11786  return xtd::convert::to_sbyte(value);
11787  }
11788 
11804  template<>
11805  inline sbyte as<sbyte>(int64 value) {
11806  return xtd::convert::to_sbyte(value);
11807  }
11808 
11824  template<>
11825  inline sbyte as<sbyte>(slong value) {
11826  return xtd::convert::to_sbyte(value);
11827  }
11828 
11844  template<>
11845  inline sbyte as<sbyte>(sbyte value) {
11846  return xtd::convert::to_sbyte(value);
11847  }
11848 
11864  template<>
11865  inline sbyte as<sbyte>(uint16 value) {
11866  return xtd::convert::to_sbyte(value);
11867  }
11868 
11884  template<>
11885  inline sbyte as<sbyte>(uint32 value) {
11886  return xtd::convert::to_sbyte(value);
11887  }
11888 
11904  template<>
11905  inline sbyte as<sbyte>(uint64 value) {
11906  return xtd::convert::to_sbyte(value);
11907  }
11908 
11924  template<>
11925  inline sbyte as<sbyte>(xtd::ulong value) {
11926  return xtd::convert::to_sbyte(value);
11927  }
11928 
11945  template<>
11946  inline sbyte as<sbyte>(const xtd::ustring& value) {
11947  return xtd::convert::to_sbyte(value);
11948  }
11949 
11967  template<>
11968  inline sbyte as<sbyte>(const xtd::ustring& value, xtd::byte from_base) {
11969  return xtd::convert::to_sbyte(value, from_base);
11970  }
11971 
11988  template<>
11989  inline sbyte as<sbyte>(const std::string& value) {
11990  return xtd::convert::to_sbyte(value);
11991  }
11992 
11993 #if defined(__cpp_lib_char8_t)
11994  template<>
12011  inline sbyte as<sbyte>(const std::u8string& value) {
12012  return xtd::convert::to_sbyte(value);
12013  }
12014 #endif
12015 
12032  template<>
12033  inline sbyte as<sbyte>(const std::u16string& value) {
12034  return xtd::convert::to_sbyte(value);
12035  }
12036 
12053  template<>
12054  inline sbyte as<sbyte>(const std::u32string& value) {
12055  return xtd::convert::to_sbyte(value);
12056  }
12057 
12074  template<>
12075  inline sbyte as<sbyte>(const std::wstring& value) {
12076  return xtd::convert::to_sbyte(value);
12077  }
12078 
12095  template<>
12096  inline sbyte as<sbyte>(const char* value) {
12097  return xtd::convert::to_sbyte(value);
12098  }
12099 
12116  template<>
12117  inline sbyte as<sbyte>(char* value) {
12118  return xtd::convert::to_sbyte(value);
12119  }
12120 
12121 #if defined(__cpp_lib_char8_t)
12122  template<>
12139  inline sbyte as<sbyte>(const char8* value) {
12140  return xtd::convert::to_sbyte(value);
12141  }
12142 
12159  template<>
12160  inline sbyte as<sbyte>(char8* value) {
12161  return xtd::convert::to_sbyte(value);
12162  }
12163 #endif
12164 
12181  template<>
12182  inline sbyte as<sbyte>(const char16* value) {
12183  return xtd::convert::to_sbyte(value);
12184  }
12185 
12202  template<>
12203  inline sbyte as<sbyte>(char16* value) {
12204  return xtd::convert::to_sbyte(value);
12205  }
12206 
12223  template<>
12224  inline sbyte as<sbyte>(const char32* value) {
12225  return xtd::convert::to_sbyte(value);
12226  }
12227 
12244  template<>
12245  inline sbyte as<sbyte>(char32* value) {
12246  return xtd::convert::to_sbyte(value);
12247  }
12248 
12265  template<>
12266  inline sbyte as<sbyte>(const wchar* value) {
12267  return xtd::convert::to_sbyte(value);
12268  }
12269 
12286  template<>
12287  inline sbyte as<sbyte>(wchar* value) {
12288  return xtd::convert::to_sbyte(value);
12289  }
12290 
12307  template<>
12308  inline uint16 as<uint16>(std::any value) {
12309  return xtd::convert::to_uint16(value);
12310  }
12311 
12327  template<>
12328  inline uint16 as<uint16>(bool value) {
12329  return xtd::convert::to_uint16(value);
12330  }
12331 
12347  template<>
12348  inline uint16 as<uint16>(xtd::byte value) {
12349  return xtd::convert::to_uint16(value);
12350  }
12351 
12368  template<>
12369  inline uint16 as<uint16>(char value) {
12370  return xtd::convert::to_uint16(value);
12371  }
12372 
12373 #if defined(__cpp_lib_char8_t)
12374  template<>
12391  inline uint16 as<uint16>(char8 value) {
12392  return xtd::convert::to_uint16(value);
12393  }
12394 #endif
12395 
12412  template<>
12413  inline uint16 as<uint16>(char16 value) {
12414  return xtd::convert::to_uint16(value);
12415  }
12416 
12433  template<>
12434  inline uint16 as<uint16>(char32 value) {
12435  return xtd::convert::to_uint16(value);
12436  }
12437 
12454  template<>
12455  inline uint16 as<uint16>(wchar value) {
12456  return xtd::convert::to_uint16(value);
12457  }
12458 
12474  template<>
12475  inline uint16 as<uint16>(decimal value) {
12476  return xtd::convert::to_uint16(value);
12477  }
12478 
12494  template<>
12495  inline uint16 as<uint16>(double value) {
12496  return xtd::convert::to_uint16(value);
12497  }
12498 
12514  template<>
12515  inline uint16 as<uint16>(float value) {
12516  return xtd::convert::to_uint16(value);
12517  }
12518 
12534  template<>
12535  inline uint16 as<uint16>(int16 value) {
12536  return xtd::convert::to_uint16(value);
12537  }
12538 
12554  template<>
12555  inline uint16 as<uint16>(int32 value) {
12556  return xtd::convert::to_uint16(value);
12557  }
12558 
12574  template<>
12575  inline uint16 as<uint16>(int64 value) {
12576  return xtd::convert::to_uint16(value);
12577  }
12578 
12594  template<>
12595  inline uint16 as<uint16>(slong value) {
12596  return xtd::convert::to_uint16(value);
12597  }
12598 
12614  template<>
12615  inline uint16 as<uint16>(sbyte value) {
12616  return xtd::convert::to_uint16(value);
12617  }
12618 
12634  template<>
12635  inline uint16 as<uint16>(uint16 value) {
12636  return xtd::convert::to_uint16(value);
12637  }
12638 
12654  template<>
12655  inline uint16 as<uint16>(uint32 value) {
12656  return xtd::convert::to_uint16(value);
12657  }
12658 
12674  template<>
12675  inline uint16 as<uint16>(uint64 value) {
12676  return xtd::convert::to_uint16(value);
12677  }
12678 
12694  template<>
12695  inline uint16 as<uint16>(xtd::ulong value) {
12696  return xtd::convert::to_uint16(value);
12697  }
12698 
12715  template<>
12716  inline uint16 as<uint16>(const xtd::ustring& value) {
12717  return xtd::convert::to_uint16(value);
12718  }
12719 
12737  template<>
12738  inline uint16 as<uint16>(const xtd::ustring& value, xtd::byte from_base) {
12739  return xtd::convert::to_uint16(value, from_base);
12740  }
12741 
12758  template<>
12759  inline uint16 as<uint16>(const std::string& value) {
12760  return xtd::convert::to_uint16(value);
12761  }
12762 
12763 #if defined(__cpp_lib_char8_t)
12764  template<>
12781  inline uint16 as<uint16>(const std::u8string& value) {
12782  return xtd::convert::to_uint16(value);
12783  }
12784 #endif
12785 
12802  template<>
12803  inline uint16 as<uint16>(const std::u16string& value) {
12804  return xtd::convert::to_uint16(value);
12805  }
12806 
12823  template<>
12824  inline uint16 as<uint16>(const std::u32string& value) {
12825  return xtd::convert::to_uint16(value);
12826  }
12827 
12844  template<>
12845  inline uint16 as<uint16>(const std::wstring& value) {
12846  return xtd::convert::to_uint16(value);
12847  }
12848 
12865  template<>
12866  inline uint16 as<uint16>(const char* value) {
12867  return xtd::convert::to_uint16(value);
12868  }
12869 
12886  template<>
12887  inline uint16 as<uint16>(char* value) {
12888  return xtd::convert::to_uint16(value);
12889  }
12890 
12891 #if defined(__cpp_lib_char8_t)
12892  template<>
12909  inline uint16 as<uint16>(const char8* value) {
12910  return xtd::convert::to_uint16(value);
12911  }
12912 
12929  template<>
12930  inline uint16 as<uint16>(char8* value) {
12931  return xtd::convert::to_uint16(value);
12932  }
12933 #endif
12934 
12951  template<>
12952  inline uint16 as<uint16>(const char16* value) {
12953  return xtd::convert::to_uint16(value);
12954  }
12955 
12972  template<>
12973  inline uint16 as<uint16>(char16* value) {
12974  return xtd::convert::to_uint16(value);
12975  }
12976 
12993  template<>
12994  inline uint16 as<uint16>(const char32* value) {
12995  return xtd::convert::to_uint16(value);
12996  }
12997 
13014  template<>
13015  inline uint16 as<uint16>(char32* value) {
13016  return xtd::convert::to_uint16(value);
13017  }
13018 
13035  template<>
13036  inline uint16 as<uint16>(const wchar* value) {
13037  return xtd::convert::to_uint16(value);
13038  }
13039 
13056  template<>
13057  inline uint16 as<uint16>(wchar* value) {
13058  return xtd::convert::to_uint16(value);
13059  }
13060 
13077  template<>
13078  inline uint32 as<uint32>(std::any value) {
13079  return xtd::convert::to_uint32(value);
13080  }
13081 
13097  template<>
13098  inline uint32 as<uint32>(bool value) {
13099  return xtd::convert::to_uint32(value);
13100  }
13101 
13117  template<>
13118  inline uint32 as<uint32>(xtd::byte value) {
13119  return xtd::convert::to_uint32(value);
13120  }
13121 
13138  template<>
13139  inline uint32 as<uint32>(char value) {
13140  return xtd::convert::to_uint32(value);
13141  }
13142 
13143 #if defined(__cpp_lib_char8_t)
13144  template<>
13161  inline uint32 as<uint32>(char8 value) {
13162  return xtd::convert::to_uint32(value);
13163  }
13164 #endif
13165 
13182  template<>
13183  inline uint32 as<uint32>(char16 value) {
13184  return xtd::convert::to_uint32(value);
13185  }
13186 
13203  template<>
13204  inline uint32 as<uint32>(char32 value) {
13205  return xtd::convert::to_uint32(value);
13206  }
13207 
13224  template<>
13225  inline uint32 as<uint32>(wchar value) {
13226  return xtd::convert::to_uint32(value);
13227  }
13228 
13244  template<>
13245  inline uint32 as<uint32>(decimal value) {
13246  return xtd::convert::to_uint32(value);
13247  }
13248 
13264  template<>
13265  inline uint32 as<uint32>(double value) {
13266  return xtd::convert::to_uint32(value);
13267  }
13268 
13284  template<>
13285  inline uint32 as<uint32>(float value) {
13286  return xtd::convert::to_uint32(value);
13287  }
13288 
13304  template<>
13305  inline uint32 as<uint32>(int16 value) {
13306  return xtd::convert::to_uint32(value);
13307  }
13308 
13324  template<>
13325  inline uint32 as<uint32>(int32 value) {
13326  return xtd::convert::to_uint32(value);
13327  }
13328 
13344  template<>
13345  inline uint32 as<uint32>(int64 value) {
13346  return xtd::convert::to_uint32(value);
13347  }
13348 
13364  template<>
13365  inline uint32 as<uint32>(slong value) {
13366  return xtd::convert::to_uint32(value);
13367  }
13368 
13384  template<>
13385  inline uint32 as<uint32>(sbyte value) {
13386  return xtd::convert::to_uint32(value);
13387  }
13388 
13404  template<>
13405  inline uint32 as<uint32>(uint16 value) {
13406  return xtd::convert::to_uint32(value);
13407  }
13408 
13424  template<>
13425  inline uint32 as<uint32>(uint32 value) {
13426  return xtd::convert::to_uint32(value);
13427  }
13428 
13444  template<>
13445  inline uint32 as<uint32>(uint64 value) {
13446  return xtd::convert::to_uint32(value);
13447  }
13448 
13464  template<>
13465  inline uint32 as<uint32>(xtd::ulong value) {
13466  return xtd::convert::to_uint32(value);
13467  }
13468 
13485  template<>
13486  inline uint32 as<uint32>(const xtd::ustring& value) {
13487  return xtd::convert::to_uint32(value);
13488  }
13489 
13507  template<>
13508  inline uint32 as<uint32>(const xtd::ustring& value, xtd::byte from_base) {
13509  return xtd::convert::to_uint32(value, from_base);
13510  }
13511 
13528  template<>
13529  inline uint32 as<uint32>(const std::string& value) {
13530  return xtd::convert::to_uint32(value);
13531  }
13532 
13533 #if defined(__cpp_lib_char8_t)
13534  template<>
13551  inline uint32 as<uint32>(const std::u8string& value) {
13552  return xtd::convert::to_uint32(value);
13553  }
13554 #endif
13555 
13572  template<>
13573  inline uint32 as<uint32>(const std::u16string& value) {
13574  return xtd::convert::to_uint32(value);
13575  }
13576 
13593  template<>
13594  inline uint32 as<uint32>(const std::u32string& value) {
13595  return xtd::convert::to_uint32(value);
13596  }
13597 
13614  template<>
13615  inline uint32 as<uint32>(const std::wstring& value) {
13616  return xtd::convert::to_uint32(value);
13617  }
13618 
13635  template<>
13636  inline uint32 as<uint32>(const char* value) {
13637  return xtd::convert::to_uint32(value);
13638  }
13639 
13656  template<>
13657  inline uint32 as<uint32>(char* value) {
13658  return xtd::convert::to_uint32(value);
13659  }
13660 
13661 #if defined(__cpp_lib_char8_t)
13662  template<>
13679  inline uint32 as<uint32>(const char8* value) {
13680  return xtd::convert::to_uint32(value);
13681  }
13682 
13699  template<>
13700  inline uint32 as<uint32>(char8* value) {
13701  return xtd::convert::to_uint32(value);
13702  }
13703 #endif
13704 
13721  template<>
13722  inline uint32 as<uint32>(const char16* value) {
13723  return xtd::convert::to_uint32(value);
13724  }
13725 
13742  template<>
13743  inline uint32 as<uint32>(char16* value) {
13744  return xtd::convert::to_uint32(value);
13745  }
13746 
13763  template<>
13764  inline uint32 as<uint32>(const char32* value) {
13765  return xtd::convert::to_uint32(value);
13766  }
13767 
13784  template<>
13785  inline uint32 as<uint32>(char32* value) {
13786  return xtd::convert::to_uint32(value);
13787  }
13788 
13805  template<>
13806  inline uint32 as<uint32>(const wchar* value) {
13807  return xtd::convert::to_uint32(value);
13808  }
13809 
13826  template<>
13827  inline uint32 as<uint32>(wchar* value) {
13828  return xtd::convert::to_uint32(value);
13829  }
13830 
13847  template<>
13848  inline uint64 as<uint64>(std::any value) {
13849  return xtd::convert::to_uint64(value);
13850  }
13851 
13867  template<>
13868  inline uint64 as<uint64>(bool value) {
13869  return xtd::convert::to_uint64(value);
13870  }
13871 
13887  template<>
13888  inline uint64 as<uint64>(xtd::byte value) {
13889  return xtd::convert::to_uint64(value);
13890  }
13891 
13908  template<>
13909  inline uint64 as<uint64>(char value) {
13910  return xtd::convert::to_uint64(value);
13911  }
13912 
13913 #if defined(__cpp_lib_char8_t)
13914  template<>
13931  inline uint64 as<uint64>(char8 value) {
13932  return xtd::convert::to_uint64(value);
13933  }
13934 #endif
13935 
13952  template<>
13953  inline uint64 as<uint64>(char16 value) {
13954  return xtd::convert::to_uint64(value);
13955  }
13956 
13973  template<>
13974  inline uint64 as<uint64>(char32 value) {
13975  return xtd::convert::to_uint64(value);
13976  }
13977 
13994  template<>
13995  inline uint64 as<uint64>(wchar value) {
13996  return xtd::convert::to_uint64(value);
13997  }
13998 
14014  template<>
14015  inline uint64 as<uint64>(decimal value) {
14016  return xtd::convert::to_uint64(value);
14017  }
14018 
14034  template<>
14035  inline uint64 as<uint64>(double value) {
14036  return xtd::convert::to_uint64(value);
14037  }
14038 
14054  template<>
14055  inline uint64 as<uint64>(float value) {
14056  return xtd::convert::to_uint64(value);
14057  }
14058 
14074  template<>
14075  inline uint64 as<uint64>(int16 value) {
14076  return xtd::convert::to_uint64(value);
14077  }
14078 
14094  template<>
14095  inline uint64 as<uint64>(int32 value) {
14096  return xtd::convert::to_uint64(value);
14097  }
14098 
14114  template<>
14115  inline uint64 as<uint64>(int64 value) {
14116  return xtd::convert::to_uint64(value);
14117  }
14118 
14134  template<>
14135  inline uint64 as<uint64>(slong value) {
14136  return xtd::convert::to_uint64(value);
14137  }
14138 
14154  template<>
14155  inline uint64 as<uint64>(sbyte value) {
14156  return xtd::convert::to_uint64(value);
14157  }
14158 
14174  template<>
14175  inline uint64 as<uint64>(uint16 value) {
14176  return xtd::convert::to_uint64(value);
14177  }
14178 
14194  template<>
14195  inline uint64 as<uint64>(uint32 value) {
14196  return xtd::convert::to_uint64(value);
14197  }
14198 
14214  template<>
14215  inline uint64 as<uint64>(uint64 value) {
14216  return xtd::convert::to_uint64(value);
14217  }
14218 
14234  template<>
14235  inline uint64 as<uint64>(xtd::ulong value) {
14236  return xtd::convert::to_uint64(value);
14237  }
14238 
14255  template<>
14256  inline uint64 as<uint64>(const xtd::ustring& value) {
14257  return xtd::convert::to_uint64(value);
14258  }
14259 
14277  template<>
14278  inline uint64 as<uint64>(const xtd::ustring& value, xtd::byte from_base) {
14279  return xtd::convert::to_uint64(value, from_base);
14280  }
14281 
14298  template<>
14299  inline uint64 as<uint64>(const std::string& value) {
14300  return xtd::convert::to_uint64(value);
14301  }
14302 
14303 #if defined(__cpp_lib_char8_t)
14304  template<>
14321  inline uint64 as<uint64>(const std::u8string& value) {
14322  return xtd::convert::to_uint64(value);
14323  }
14324 #endif
14325 
14342  template<>
14343  inline uint64 as<uint64>(const std::u16string& value) {
14344  return xtd::convert::to_uint64(value);
14345  }
14346 
14363  template<>
14364  inline uint64 as<uint64>(const std::u32string& value) {
14365  return xtd::convert::to_uint64(value);
14366  }
14367 
14384  template<>
14385  inline uint64 as<uint64>(const std::wstring& value) {
14386  return xtd::convert::to_uint64(value);
14387  }
14388 
14405  template<>
14406  inline uint64 as<uint64>(const char* value) {
14407  return xtd::convert::to_uint64(value);
14408  }
14409 
14426  template<>
14427  inline uint64 as<uint64>(char* value) {
14428  return xtd::convert::to_uint64(value);
14429  }
14430 
14431 #if defined(__cpp_lib_char8_t)
14432  template<>
14449  inline uint64 as<uint64>(const char8* value) {
14450  return xtd::convert::to_uint64(value);
14451  }
14452 
14469  template<>
14470  inline uint64 as<uint64>(char8* value) {
14471  return xtd::convert::to_uint64(value);
14472  }
14473 #endif
14474 
14491  template<>
14492  inline uint64 as<uint64>(const char16* value) {
14493  return xtd::convert::to_uint64(value);
14494  }
14495 
14512  template<>
14513  inline uint64 as<uint64>(char16* value) {
14514  return xtd::convert::to_uint64(value);
14515  }
14516 
14533  template<>
14534  inline uint64 as<uint64>(const char32* value) {
14535  return xtd::convert::to_uint64(value);
14536  }
14537 
14554  template<>
14555  inline uint64 as<uint64>(char32* value) {
14556  return xtd::convert::to_uint64(value);
14557  }
14558 
14575  template<>
14576  inline uint64 as<uint64>(const wchar* value) {
14577  return xtd::convert::to_uint64(value);
14578  }
14579 
14596  template<>
14597  inline uint64 as<uint64>(wchar* value) {
14598  return xtd::convert::to_uint64(value);
14599  }
14600 
14617  template<>
14618  inline xtd::ulong as<xtd::ulong>(std::any value) {
14619  return xtd::convert::to_ullong(value);
14620  }
14621 
14637  template<>
14638  inline xtd::ulong as<xtd::ulong>(bool value) {
14639  return xtd::convert::to_ullong(value);
14640  }
14641 
14657  template<>
14658  inline xtd::ulong as<xtd::ulong>(xtd::byte value) {
14659  return xtd::convert::to_ullong(value);
14660  }
14661 
14678  template<>
14679  inline xtd::ulong as<xtd::ulong>(char value) {
14680  return xtd::convert::to_ullong(value);
14681  }
14682 
14683 #if defined(__cpp_lib_char8_t)
14684  template<>
14701  inline xtd::ulong as<xtd::ulong>(char8 value) {
14702  return xtd::convert::to_ullong(value);
14703  }
14704 #endif
14705 
14722  template<>
14723  inline xtd::ulong as<xtd::ulong>(char16 value) {
14724  return xtd::convert::to_ullong(value);
14725  }
14726 
14743  template<>
14744  inline xtd::ulong as<xtd::ulong>(char32 value) {
14745  return xtd::convert::to_ullong(value);
14746  }
14747 
14764  template<>
14765  inline xtd::ulong as<xtd::ulong>(wchar value) {
14766  return xtd::convert::to_ullong(value);
14767  }
14768 
14784  template<>
14785  inline xtd::ulong as<xtd::ulong>(decimal value) {
14786  return xtd::convert::to_ullong(value);
14787  }
14788 
14804  template<>
14805  inline xtd::ulong as<xtd::ulong>(double value) {
14806  return xtd::convert::to_ullong(value);
14807  }
14808 
14824  template<>
14825  inline xtd::ulong as<xtd::ulong>(float value) {
14826  return xtd::convert::to_ullong(value);
14827  }
14828 
14844  template<>
14845  inline xtd::ulong as<xtd::ulong>(int16 value) {
14846  return xtd::convert::to_ullong(value);
14847  }
14848 
14864  template<>
14865  inline xtd::ulong as<xtd::ulong>(int32 value) {
14866  return xtd::convert::to_ullong(value);
14867  }
14868 
14884  template<>
14885  inline xtd::ulong as<xtd::ulong>(int64 value) {
14886  return xtd::convert::to_ullong(value);
14887  }
14888 
14904  template<>
14905  inline xtd::ulong as<xtd::ulong>(slong value) {
14906  return xtd::convert::to_ullong(value);
14907  }
14908 
14924  template<>
14925  inline xtd::ulong as<xtd::ulong>(sbyte value) {
14926  return xtd::convert::to_ullong(value);
14927  }
14928 
14944  template<>
14945  inline xtd::ulong as<xtd::ulong>(uint16 value) {
14946  return xtd::convert::to_ullong(value);
14947  }
14948 
14964  template<>
14965  inline xtd::ulong as<xtd::ulong>(uint32 value) {
14966  return xtd::convert::to_ullong(value);
14967  }
14968 
14984  template<>
14985  inline xtd::ulong as<xtd::ulong>(uint64 value) {
14986  return xtd::convert::to_ullong(value);
14987  }
14988 
15004  template<>
15005  inline xtd::ulong as<xtd::ulong>(xtd::ulong value) {
15006  return xtd::convert::to_ullong(value);
15007  }
15008 
15025  template<>
15026  inline xtd::ulong as<xtd::ulong>(const xtd::ustring& value) {
15027  return xtd::convert::to_ullong(value);
15028  }
15029 
15047  template<>
15048  inline xtd::ulong as<xtd::ulong>(const xtd::ustring& value, xtd::byte from_base) {
15049  return xtd::convert::to_ullong(value, from_base);
15050  }
15051 
15068  template<>
15069  inline xtd::ulong as<xtd::ulong>(const std::string& value) {
15070  return xtd::convert::to_ullong(value);
15071  }
15072 
15073 #if defined(__cpp_lib_char8_t)
15074  template<>
15091  inline xtd::ulong as<xtd::ulong>(const std::u8string& value) {
15092  return xtd::convert::to_ullong(value);
15093  }
15094 #endif
15095 
15112  template<>
15113  inline xtd::ulong as<xtd::ulong>(const std::u16string& value) {
15114  return xtd::convert::to_ullong(value);
15115  }
15116 
15133  template<>
15134  inline xtd::ulong as<xtd::ulong>(const std::u32string& value) {
15135  return xtd::convert::to_ullong(value);
15136  }
15137 
15154  template<>
15155  inline xtd::ulong as<xtd::ulong>(const std::wstring& value) {
15156  return xtd::convert::to_ullong(value);
15157  }
15158 
15175  template<>
15176  inline xtd::ulong as<xtd::ulong>(const char* value) {
15177  return xtd::convert::to_ullong(value);
15178  }
15179 
15196  template<>
15197  inline xtd::ulong as<xtd::ulong>(char* value) {
15198  return xtd::convert::to_ullong(value);
15199  }
15200 
15201 #if defined(__cpp_lib_char8_t)
15202  template<>
15219  inline xtd::ulong as<xtd::ulong>(const char8* value) {
15220  return xtd::convert::to_ullong(value);
15221  }
15222 
15239  template<>
15240  inline xtd::ulong as<xtd::ulong>(char8* value) {
15241  return xtd::convert::to_ullong(value);
15242  }
15243 #endif
15244 
15261  template<>
15262  inline xtd::ulong as<xtd::ulong>(const char16* value) {
15263  return xtd::convert::to_ullong(value);
15264  }
15265 
15282  template<>
15283  inline xtd::ulong as<xtd::ulong>(char16* value) {
15284  return xtd::convert::to_ullong(value);
15285  }
15286 
15303  template<>
15304  inline xtd::ulong as<xtd::ulong>(const char32* value) {
15305  return xtd::convert::to_ullong(value);
15306  }
15307 
15324  template<>
15325  inline xtd::ulong as<xtd::ulong>(char32* value) {
15326  return xtd::convert::to_ullong(value);
15327  }
15328 
15345  template<>
15346  inline xtd::ulong as<xtd::ulong>(const wchar* value) {
15347  return xtd::convert::to_ullong(value);
15348  }
15349 
15366  template<>
15367  inline xtd::ulong as<xtd::ulong>(wchar* value) {
15368  return xtd::convert::to_ullong(value);
15369  }
15370 
15387  template<>
15388  inline ustring as<ustring>(std::any value) {
15389  return xtd::convert::to_string(value);
15390  }
15391 
15407  template<>
15408  inline ustring as<ustring>(bool value) {
15409  return xtd::convert::to_string(value);
15410  }
15411 
15427  template<>
15429  return xtd::convert::to_string(value);
15430  }
15431 
15449  template<>
15450  inline ustring as<ustring>(xtd::byte value, xtd::byte from_base) {
15451  return xtd::convert::to_string(value, from_base);
15452  }
15453 
15470  template<>
15471  inline ustring as<ustring>(char value) {
15472  return xtd::convert::to_string(value);
15473  }
15474 
15475 #if defined(__cpp_lib_char8_t)
15476  template<>
15493  inline ustring as<ustring>(char8 value) {
15494  return xtd::convert::to_string(value);
15495  }
15496 #endif
15497 
15514  template<>
15515  inline ustring as<ustring>(char16 value) {
15516  return xtd::convert::to_string(value);
15517  }
15518 
15535  template<>
15536  inline ustring as<ustring>(char32 value) {
15537  return xtd::convert::to_string(value);
15538  }
15539 
15556  template<>
15557  inline ustring as<ustring>(wchar value) {
15558  return xtd::convert::to_string(value);
15559  }
15560 
15576  template<>
15577  inline ustring as<ustring>(decimal value) {
15578  return xtd::convert::to_string(value);
15579  }
15580 
15596  template<>
15597  inline ustring as<ustring>(double value) {
15598  return xtd::convert::to_string(value);
15599  }
15600 
15616  template<>
15617  inline ustring as<ustring>(float value) {
15618  return xtd::convert::to_string(value);
15619  }
15620 
15636  template<>
15637  inline ustring as<ustring>(int16 value) {
15638  return xtd::convert::to_string(value);
15639  }
15640 
15658  template<>
15659  inline ustring as<ustring>(int16 value, xtd::byte from_base) {
15660  return xtd::convert::to_string(value, from_base);
15661  }
15662 
15678  template<>
15679  inline ustring as<ustring>(int32 value) {
15680  return xtd::convert::to_string(value);
15681  }
15682 
15700  template<>
15701  inline ustring as<ustring>(int32 value, xtd::byte from_base) {
15702  return xtd::convert::to_string(value, from_base);
15703  }
15704 
15720  template<>
15721  inline ustring as<ustring>(int64 value) {
15722  return xtd::convert::to_string(value);
15723  }
15724 
15742  template<>
15743  inline ustring as<ustring>(int64 value, xtd::byte from_base) {
15744  return xtd::convert::to_string(value, from_base);
15745  }
15746 
15762  template<>
15763  inline ustring as<ustring>(slong value) {
15764  return xtd::convert::to_string(value);
15765  }
15766 
15784  template<>
15785  inline ustring as<ustring>(slong value, xtd::byte from_base) {
15786  return xtd::convert::to_string(value, from_base);
15787  }
15788 
15804  template<>
15805  inline ustring as<ustring>(sbyte value) {
15806  return xtd::convert::to_string(value);
15807  }
15808 
15826  template<>
15827  inline ustring as<ustring>(sbyte value, xtd::byte from_base) {
15828  return xtd::convert::to_string(value, from_base);
15829  }
15830 
15846  template<>
15847  inline ustring as<ustring>(uint16 value) {
15848  return xtd::convert::to_string(value);
15849  }
15850 
15868  template<>
15869  inline ustring as<ustring>(uint16 value, xtd::byte from_base) {
15870  return xtd::convert::to_string(value, from_base);
15871  }
15872 
15888  template<>
15889  inline ustring as<ustring>(uint32 value) {
15890  return xtd::convert::to_string(value);
15891  }
15892 
15910  template<>
15911  inline ustring as<ustring>(uint32 value, xtd::byte from_base) {
15912  return xtd::convert::to_string(value, from_base);
15913  }
15914 
15930  template<>
15931  inline ustring as<ustring>(uint64 value) {
15932  return xtd::convert::to_string(value);
15933  }
15934 
15952  template<>
15953  inline ustring as<ustring>(uint64 value, xtd::byte from_base) {
15954  return xtd::convert::to_string(value, from_base);
15955  }
15956 
15972  template<>
15974  return xtd::convert::to_string(value);
15975  }
15976 
15994  template<>
15995  inline ustring as<ustring>(xtd::ulong value, xtd::byte from_base) {
15996  return xtd::convert::to_string(value, from_base);
15997  }
15998 
15999  // ___________________________________________________________________________________________
16000  // xtd::convert_pointer specialization
16001 
16016  template<typename new_type_t, typename current_type_t>
16017  const new_type_t& as(const current_type_t& value) {
16018  thread_local static __as_enum__<new_type_t, current_type_t, typename std::conditional<std::is_enum<current_type_t>::value, std::true_type, std::false_type>::type> e;
16019  return e.convert(value);
16020  }
16021 
16036  template<typename new_type_t, typename current_type_t>
16037  new_type_t& as(current_type_t& value) {
16038  thread_local static __as_enum__<new_type_t, current_type_t, typename std::conditional<std::is_enum<current_type_t>::value, std::true_type, std::false_type>::type> e;
16039  return e.convert(value);
16040  }
16041 
16055  template<typename new_type_t, typename current_type_t>
16056  const new_type_t* as(const current_type_t* value) {
16057  return xtd::convert_pointer::to_ptr<new_type_t>(value);
16058  }
16059 
16073  template<typename new_type_t, typename current_type_t>
16074  new_type_t* as(current_type_t* value) {
16075  return xtd::convert_pointer::to_ptr<new_type_t>(value);
16076  }
16077 
16092  template<typename new_type_t, typename current_type_t>
16093  std::unique_ptr<new_type_t> as(std::unique_ptr<current_type_t>& value) {
16094  return xtd::convert_pointer::to_unique_ptr<new_type_t>(value);
16095  }
16096 
16110  template<typename new_type_t, typename current_type_t>
16111  std::unique_ptr<new_type_t> as(std::unique_ptr<current_type_t>&& value) {
16112  return xtd::convert_pointer::to_unique_ptr<new_type_t>(value);
16113  }
16114 
16129  template<typename new_type_t, typename current_type_t>
16130  std::shared_ptr<new_type_t> as(const std::shared_ptr<current_type_t>& value) {
16131  return xtd::convert_pointer::to_shared_ptr<new_type_t>(value);
16132  }
16133 
16147  template<typename new_type_t, typename current_type_t>
16148  std::shared_ptr<new_type_t> as(std::shared_ptr<current_type_t>& value) {
16149  return xtd::convert_pointer::to_shared_ptr<new_type_t>(value);
16150  }
16151 
16166  template<typename new_type_t, typename current_type_t>
16167  std::shared_ptr<new_type_t> as(std::shared_ptr<current_type_t>&& value) {
16168  return xtd::convert_pointer::to_shared_ptr<new_type_t>(value);
16169  }
16170 
16171  // ___________________________________________________________________________________________
16172  // xtd::convert_string specialization
16173 
16187  template<>
16188  inline std::string as<std::string>(const std::string& value) {
16189  return xtd::convert_string::to_string(value);
16190  }
16195  template<>
16196  inline std::string as<std::string>(std::string& value) {
16197  return xtd::convert_string::to_string(value);
16198  }
16199 
16213  template<>
16214  inline xtd::ustring as<xtd::ustring>(const std::string& value) {
16215  return xtd::convert_string::to_ustring(value);
16216  }
16217 
16231  template<>
16232  inline xtd::ustring as<xtd::ustring>(std::string& value) {
16233  return xtd::convert_string::to_ustring(value);
16234  }
16235 
16236 #if defined(__cpp_lib_char8_t)
16237  template<>
16251  inline std::u8string as<std::u8string>(const std::string& value) {
16252  return xtd::convert_string::to_u8string(value);
16253  }
16254 
16268  template<>
16269  inline std::u8string as<std::u8string>(std::string& value) {
16270  return xtd::convert_string::to_u8string(value);
16271  }
16272 #endif
16273 
16287  template<>
16288  inline std::u16string as<std::u16string>(const std::string& value) {
16289  return xtd::convert_string::to_u16string(value);
16290  }
16291 
16305  template<>
16306  inline std::u16string as<std::u16string>(std::string& value) {
16307  return xtd::convert_string::to_u16string(value);
16308  }
16309 
16323  template<>
16324  inline std::u32string as<std::u32string>(const std::string& value) {
16325  return xtd::convert_string::to_u32string(value);
16326  }
16327 
16341  template<>
16342  inline std::u32string as<std::u32string>(std::string& value) {
16343  return xtd::convert_string::to_u32string(value);
16344  }
16345 
16359  template<>
16360  inline std::wstring as<std::wstring>(const std::string& value) {
16361  return xtd::convert_string::to_wstring(value);
16362  }
16363 
16377  template<>
16378  inline std::wstring as<std::wstring>(std::string& value) {
16379  return xtd::convert_string::to_wstring(value);
16380  }
16381 
16395  template<>
16396  inline std::string as<std::string>(const char* value) {
16397  return xtd::convert_string::to_string(value);
16398  }
16399 
16413  template<>
16414  inline xtd::ustring as<xtd::ustring>(const char* value) {
16415  return xtd::convert_string::to_ustring(value);
16416  }
16417 
16418 #if defined(__cpp_lib_char8_t)
16419  template<>
16433  inline std::u8string as<std::u8string>(const char* value) {
16434  return xtd::convert_string::to_u8string(value);
16435  }
16436 #endif
16437 
16451  template<>
16452  inline std::u16string as<std::u16string>(const char* value) {
16453  return xtd::convert_string::to_u16string(value);
16454  }
16455 
16469  template<>
16470  inline std::u32string as<std::u32string>(const char* value) {
16471  return xtd::convert_string::to_u32string(value);
16472  }
16473 
16487  template<>
16488  inline std::wstring as<std::wstring>(const char* value) {
16489  return xtd::convert_string::to_wstring(value);
16490  }
16491 
16505  template<>
16506  inline std::string as<std::string>(char* value) {
16507  return xtd::convert_string::to_string(value);
16508  }
16509 
16523  template<>
16524  inline xtd::ustring as<xtd::ustring>(char* value) {
16525  return xtd::convert_string::to_ustring(value);
16526  }
16527 
16528 #if defined(__cpp_lib_char8_t)
16529  template<>
16543  inline std::u8string as<std::u8string>(char* value) {
16544  return xtd::convert_string::to_u8string(value);
16545  }
16546 #endif
16547 
16561  template<>
16562  inline std::u16string as<std::u16string>(char* value) {
16563  return xtd::convert_string::to_u16string(value);
16564  }
16565 
16579  template<>
16580  inline std::u32string as<std::u32string>(char* value) {
16581  return xtd::convert_string::to_u32string(value);
16582  }
16583 
16597  template<>
16598  inline std::wstring as<std::wstring>(char* value) {
16599  return xtd::convert_string::to_wstring(value);
16600  }
16601 
16615  template<>
16616  inline std::string as<std::string>(const xtd::ustring& value) {
16617  return xtd::convert_string::to_string(value);
16618  }
16619 
16633  template<>
16634  inline std::string as<std::string>(xtd::ustring& value) {
16635  return xtd::convert_string::to_string(value);
16636  }
16637 
16651  template<>
16652  inline xtd::ustring as<xtd::ustring>(const xtd::ustring& value) {
16653  return xtd::convert_string::to_ustring(value);
16654  }
16655 
16669  template<>
16670  inline xtd::ustring as<xtd::ustring>(xtd::ustring& value) {
16671  return xtd::convert_string::to_ustring(value);
16672  }
16673 
16674 #if defined(__cpp_lib_char8_t)
16675  template<>
16689  inline std::u8string as<std::u8string>(const xtd::ustring& value) {
16690  return xtd::convert_string::to_u8string(value);
16691  }
16692 
16706  template<>
16707  inline std::u8string as<std::u8string>(xtd::ustring& value) {
16708  return xtd::convert_string::to_u8string(value);
16709  }
16710 #endif
16711 
16725  template<>
16726  inline std::u16string as<std::u16string>(const xtd::ustring& value) {
16727  return xtd::convert_string::to_u16string(value);
16728  }
16729 
16743  template<>
16744  inline std::u16string as<std::u16string>(xtd::ustring& value) {
16745  return xtd::convert_string::to_u16string(value);
16746  }
16747 
16761  template<>
16762  inline std::u32string as<std::u32string>(const xtd::ustring& value) {
16763  return xtd::convert_string::to_u32string(value);
16764  }
16765 
16779  template<>
16780  inline std::u32string as<std::u32string>(xtd::ustring& value) {
16781  return xtd::convert_string::to_u32string(value);
16782  }
16783 
16797  template<>
16798  inline std::wstring as<std::wstring>(const xtd::ustring& value) {
16799  return xtd::convert_string::to_wstring(value);
16800  }
16801 
16815  template<>
16816  inline std::wstring as<std::wstring>(xtd::ustring& value) {
16817  return xtd::convert_string::to_wstring(value);
16818  }
16819 
16820 #if defined(__cpp_lib_char8_t)
16821  template<>
16835  inline std::string as<std::string>(const std::u8string& value) {
16836  return xtd::convert_string::to_string(value);
16837  }
16838 
16852  template<>
16853  inline std::string as<std::string>(std::u8string& value) {
16854  return xtd::convert_string::to_string(value);
16855  }
16856 
16870  template<>
16871  inline xtd::ustring as<xtd::ustring>(const std::u8string& value) {
16872  return xtd::convert_string::to_ustring(value);
16873  }
16874 
16888  template<>
16889  inline xtd::ustring as<xtd::ustring>(std::u8string& value) {
16890  return xtd::convert_string::to_ustring(value);
16891  }
16892 
16906  template<>
16907  inline std::u8string as<std::u8string>(const std::u8string& value) {
16908  return xtd::convert_string::to_u8string(value);
16909  }
16910 
16924  template<>
16925  inline std::u8string as<std::u8string>(std::u8string& value) {
16926  return xtd::convert_string::to_u8string(value);
16927  }
16928 
16942  template<>
16943  inline std::u16string as<std::u16string>(const std::u8string& value) {
16944  return xtd::convert_string::to_u16string(value);
16945  }
16946 
16960  template<>
16961  inline std::u16string as<std::u16string>(std::u8string& value) {
16962  return xtd::convert_string::to_u16string(value);
16963  }
16964 
16978  template<>
16979  inline std::u32string as<std::u32string>(const std::u8string& value) {
16980  return xtd::convert_string::to_u32string(value);
16981  }
16982 
16996  template<>
16997  inline std::u32string as<std::u32string>(std::u8string& value) {
16998  return xtd::convert_string::to_u32string(value);
16999  }
17000 
17014  template<>
17015  inline std::wstring as<std::wstring>(const std::u8string& value) {
17016  return xtd::convert_string::to_wstring(value);
17017  }
17018 
17032  template<>
17033  inline std::wstring as<std::wstring>(std::u8string& value) {
17034  return xtd::convert_string::to_wstring(value);
17035  }
17036 #endif
17037 
17038 #if defined(__cpp_lib_char8_t)
17039  template<>
17053  inline std::string as<std::string>(const char8* value) {
17054  return xtd::convert_string::to_string(value);
17055  }
17056 
17070  template<>
17071  inline xtd::ustring as<xtd::ustring>(const char8* value) {
17072  return xtd::convert_string::to_ustring(value);
17073  }
17074 
17088  template<>
17089  inline std::u8string as<std::u8string>(const char8* value) {
17090  return xtd::convert_string::to_u8string(value);
17091  }
17092 
17106  template<>
17107  inline std::u16string as<std::u16string>(const char8* value) {
17108  return xtd::convert_string::to_u16string(value);
17109  }
17110 
17124  template<>
17125  inline std::u32string as<std::u32string>(const char8* value) {
17126  return xtd::convert_string::to_u32string(value);
17127  }
17128 
17142  template<>
17143  inline std::wstring as<std::wstring>(const char8* value) {
17144  return xtd::convert_string::to_wstring(value);
17145  }
17146 
17160  template<>
17161  inline std::string as<std::string>(char8* value) {
17162  return xtd::convert_string::to_string(value);
17163  }
17164 
17178  template<>
17179  inline xtd::ustring as<xtd::ustring>(char8* value) {
17180  return xtd::convert_string::to_ustring(value);
17181  }
17182 
17196  template<>
17197  inline std::u8string as<std::u8string>(char8* value) {
17198  return xtd::convert_string::to_u8string(value);
17199  }
17200 
17214  template<>
17215  inline std::u16string as<std::u16string>(char8* value) {
17216  return xtd::convert_string::to_u16string(value);
17217  }
17218 
17232  template<>
17233  inline std::u32string as<std::u32string>(char8* value) {
17234  return xtd::convert_string::to_u32string(value);
17235  }
17236 
17250  template<>
17251  inline std::wstring as<std::wstring>(char8* value) {
17252  return xtd::convert_string::to_wstring(value);
17253  }
17254 #endif
17255 
17269  template<>
17270  inline std::string as<std::string>(const std::u16string& value) {
17271  return xtd::convert_string::to_string(value);
17272  }
17273 
17287  template<>
17288  inline std::string as<std::string>(std::u16string& value) {
17289  return xtd::convert_string::to_string(value);
17290  }
17291 
17305  template<>
17306  inline xtd::ustring as<xtd::ustring>(const std::u16string& value) {
17307  return xtd::convert_string::to_ustring(value);
17308  }
17309 
17323  template<>
17324  inline xtd::ustring as<xtd::ustring>(std::u16string& value) {
17325  return xtd::convert_string::to_ustring(value);
17326  }
17327 
17328 #if defined(__cpp_lib_char8_t)
17329  template<>
17343  inline std::u8string as<std::u8string>(const std::u16string& value) {
17344  return xtd::convert_string::to_u8string(value);
17345  }
17346 
17360  template<>
17361  inline std::u8string as<std::u8string>(std::u16string& value) {
17362  return xtd::convert_string::to_u8string(value);
17363  }
17364 #endif
17365 
17379  template<>
17380  inline std::u16string as<std::u16string>(const std::u16string& value) {
17381  return xtd::convert_string::to_u16string(value);
17382  }
17383 
17397  template<>
17398  inline std::u16string as<std::u16string>(std::u16string& value) {
17399  return xtd::convert_string::to_u16string(value);
17400  }
17401 
17415  template<>
17416  inline std::u32string as<std::u32string>(const std::u16string& value) {
17417  return xtd::convert_string::to_u32string(value);
17418  }
17419 
17433  template<>
17434  inline std::u32string as<std::u32string>(std::u16string& value) {
17435  return xtd::convert_string::to_u32string(value);
17436  }
17437 
17451  template<>
17452  inline std::wstring as<std::wstring>(const std::u16string& value) {
17453  return xtd::convert_string::to_wstring(value);
17454  }
17455 
17469  template<>
17470  inline std::wstring as<std::wstring>(std::u16string& value) {
17471  return xtd::convert_string::to_wstring(value);
17472  }
17473 
17487  template<>
17488  inline std::string as<std::string>(const char16* value) {
17489  return xtd::convert_string::to_string(value);
17490  }
17491 
17505  template<>
17506  inline xtd::ustring as<xtd::ustring>(const char16* value) {
17507  return xtd::convert_string::to_ustring(value);
17508  }
17509 
17510 #if defined(__cpp_lib_char8_t)
17511  template<>
17525  inline std::u8string as<std::u8string>(const char16* value) {
17526  return xtd::convert_string::to_u8string(value);
17527  }
17528 #endif
17529 
17543  template<>
17544  inline std::u16string as<std::u16string>(const char16* value) {
17545  return xtd::convert_string::to_u16string(value);
17546  }
17547 
17561  template<>
17562  inline std::u32string as<std::u32string>(const char16* value) {
17563  return xtd::convert_string::to_u32string(value);
17564  }
17565 
17579  template<>
17580  inline std::wstring as<std::wstring>(const char16* value) {
17581  return xtd::convert_string::to_wstring(value);
17582  }
17583 
17597  template<>
17598  inline std::string as<std::string>(char16* value) {
17599  return xtd::convert_string::to_string(value);
17600  }
17601 
17615  template<>
17616  inline xtd::ustring as<xtd::ustring>(char16* value) {
17617  return xtd::convert_string::to_ustring(value);
17618  }
17619 
17620 #if defined(__cpp_lib_char8_t)
17621  template<>
17635  inline std::u8string as<std::u8string>(char16* value) {
17636  return xtd::convert_string::to_u8string(value);
17637  }
17638 #endif
17639 
17653  template<>
17654  inline std::u16string as<std::u16string>(char16* value) {
17655  return xtd::convert_string::to_u16string(value);
17656  }
17657 
17671  template<>
17672  inline std::u32string as<std::u32string>(char16* value) {
17673  return xtd::convert_string::to_u32string(value);
17674  }
17675 
17689  template<>
17690  inline std::wstring as<std::wstring>(char16* value) {
17691  return xtd::convert_string::to_wstring(value);
17692  }
17693 
17707  template<>
17708  inline std::string as<std::string>(const std::u32string& value) {
17709  return xtd::convert_string::to_string(value);
17710  }
17711 
17725  template<>
17726  inline std::string as<std::string>(std::u32string& value) {
17727  return xtd::convert_string::to_string(value);
17728  }
17729 
17743  template<>
17744  inline xtd::ustring as<xtd::ustring>(const std::u32string& value) {
17745  return xtd::convert_string::to_ustring(value);
17746  }
17747 
17761  template<>
17762  inline xtd::ustring as<xtd::ustring>(std::u32string& value) {
17763  return xtd::convert_string::to_ustring(value);
17764  }
17765 
17766 #if defined(__cpp_lib_char8_t)
17767  template<>
17781  inline std::u8string as<std::u8string>(const std::u32string& value) {
17782  return xtd::convert_string::to_u8string(value);
17783  }
17784 
17798  template<>
17799  inline std::u8string as<std::u8string>(std::u32string& value) {
17800  return xtd::convert_string::to_u8string(value);
17801  }
17802 #endif
17803 
17817  template<>
17818  inline std::u16string as<std::u16string>(const std::u32string& value) {
17819  return xtd::convert_string::to_u16string(value);
17820  }
17821 
17835  template<>
17836  inline std::u16string as<std::u16string>(std::u32string& value) {
17837  return xtd::convert_string::to_u16string(value);
17838  }
17839 
17853  template<>
17854  inline std::u32string as<std::u32string>(const std::u32string& value) {
17855  return xtd::convert_string::to_u32string(value);
17856  }
17857 
17871  template<>
17872  inline std::u32string as<std::u32string>(std::u32string& value) {
17873  return xtd::convert_string::to_u32string(value);
17874  }
17875 
17889  template<>
17890  inline std::wstring as<std::wstring>(const std::u32string& value) {
17891  return xtd::convert_string::to_wstring(value);
17892  }
17893 
17907  template<>
17908  inline std::wstring as<std::wstring>(std::u32string& value) {
17909  return xtd::convert_string::to_wstring(value);
17910  }
17911 
17925  template<>
17926  inline std::string as<std::string>(const char32* value) {
17927  return xtd::convert_string::to_string(value);
17928  }
17929 
17943  template<>
17944  inline xtd::ustring as<xtd::ustring>(const char32* value) {
17945  return xtd::convert_string::to_ustring(value);
17946  }
17947 
17948 #if defined(__cpp_lib_char8_t)
17949  template<>
17963  inline std::u8string as<std::u8string>(const char32* value) {
17964  return xtd::convert_string::to_u8string(value);
17965  }
17966 #endif
17967 
17981  template<>
17982  inline std::u16string as<std::u16string>(const char32* value) {
17983  return xtd::convert_string::to_u16string(value);
17984  }
17985 
17999  template<>
18000  inline std::u32string as<std::u32string>(const char32* value) {
18001  return xtd::convert_string::to_u32string(value);
18002  }
18003 
18017  template<>
18018  inline std::wstring as<std::wstring>(const char32* value) {
18019  return xtd::convert_string::to_wstring(value);
18020  }
18021 
18035  template<>
18036  inline std::string as<std::string>(char32* value) {
18037  return xtd::convert_string::to_string(value);
18038  }
18039 
18053  template<>
18054  inline xtd::ustring as<xtd::ustring>(char32* value) {
18055  return xtd::convert_string::to_ustring(value);
18056  }
18057 
18058 #if defined(__cpp_lib_char8_t)
18059  template<>
18073  inline std::u8string as<std::u8string>(char32* value) {
18074  return xtd::convert_string::to_u8string(value);
18075  }
18076 #endif
18077 
18091  template<>
18092  inline std::u16string as<std::u16string>(char32* value) {
18093  return xtd::convert_string::to_u16string(value);
18094  }
18095 
18109  template<>
18110  inline std::u32string as<std::u32string>(char32* value) {
18111  return xtd::convert_string::to_u32string(value);
18112  }
18113 
18127  template<>
18128  inline std::wstring as<std::wstring>(char32* value) {
18129  return xtd::convert_string::to_wstring(value);
18130  }
18131 
18145  template<>
18146  inline std::string as<std::string>(const std::wstring& value) {
18147  return xtd::convert_string::to_string(value);
18148  }
18149 
18163  template<>
18164  inline std::string as<std::string>(std::wstring& value) {
18165  return xtd::convert_string::to_string(value);
18166  }
18167 
18181  template<>
18182  inline xtd::ustring as<xtd::ustring>(const std::wstring& value) {
18183  return xtd::convert_string::to_ustring(value);
18184  }
18185 
18199  template<>
18200  inline xtd::ustring as<xtd::ustring>(std::wstring& value) {
18201  return xtd::convert_string::to_ustring(value);
18202  }
18203 
18204 #if defined(__cpp_lib_char8_t)
18205  template<>
18219  inline std::u8string as<std::u8string>(const std::wstring& value) {
18220  return xtd::convert_string::to_u8string(value);
18221  }
18222 
18236  template<>
18237  inline std::u8string as<std::u8string>(std::wstring& value) {
18238  return xtd::convert_string::to_u8string(value);
18239  }
18240 #endif
18241 
18255  template<>
18256  inline std::u16string as<std::u16string>(const std::wstring& value) {
18257  return xtd::convert_string::to_u16string(value);
18258  }
18259 
18273  template<>
18274  inline std::u16string as<std::u16string>(std::wstring& value) {
18275  return xtd::convert_string::to_u16string(value);
18276  }
18277 
18291  template<>
18292  inline std::u32string as<std::u32string>(const std::wstring& value) {
18293  return xtd::convert_string::to_u32string(value);
18294  }
18295 
18309  template<>
18310  inline std::u32string as<std::u32string>(std::wstring& value) {
18311  return xtd::convert_string::to_u32string(value);
18312  }
18313 
18327  template<>
18328  inline std::wstring as<std::wstring>(const std::wstring& value) {
18329  return xtd::convert_string::to_wstring(value);
18330  }
18331 
18345  template<>
18346  inline std::wstring as<std::wstring>(std::wstring& value) {
18347  return xtd::convert_string::to_wstring(value);
18348  }
18349 
18363  template<>
18364  inline std::string as<std::string>(const wchar* value) {
18365  return xtd::convert_string::to_string(value);
18366  }
18367 
18381  template<>
18382  inline xtd::ustring as<xtd::ustring>(const wchar* value) {
18383  return xtd::convert_string::to_ustring(value);
18384  }
18385 
18386 #if defined(__cpp_lib_char8_t)
18387  template<>
18401  inline std::u8string as<std::u8string>(const wchar* value) {
18402  return xtd::convert_string::to_u8string(value);
18403  }
18404 #endif
18405 
18419  template<>
18420  inline std::u16string as<std::u16string>(const wchar* value) {
18421  return xtd::convert_string::to_u16string(value);
18422  }
18423 
18437  template<>
18438  inline std::u32string as<std::u32string>(const wchar* value) {
18439  return xtd::convert_string::to_u32string(value);
18440  }
18441 
18455  template<>
18456  inline std::wstring as<std::wstring>(const wchar* value) {
18457  return xtd::convert_string::to_wstring(value);
18458  }
18459 
18473  template<>
18474  inline std::string as<std::string>(wchar* value) {
18475  return xtd::convert_string::to_string(value);
18476  }
18477 
18491  template<>
18492  inline xtd::ustring as<xtd::ustring>(wchar* value) {
18493  return xtd::convert_string::to_ustring(value);
18494  }
18495 
18496 #if defined(__cpp_lib_char8_t)
18497  template<>
18511  inline std::u8string as<std::u8string>(wchar* value) {
18512  return xtd::convert_string::to_u8string(value);
18513  }
18514 #endif
18515 
18529  template<>
18530  inline std::u16string as<std::u16string>(wchar* value) {
18531  return xtd::convert_string::to_u16string(value);
18532  }
18533 
18547  template<>
18548  inline std::u32string as<std::u32string>(wchar* value) {
18549  return xtd::convert_string::to_u32string(value);
18550  }
18551 
18565  template<>
18566  inline std::wstring as<std::wstring>(wchar* value) {
18567  return xtd::convert_string::to_wstring(value);
18568  }
18569 }
18570 
18571 template<typename new_type_t, typename current_type_t>
18572 new_type_t* __convert_value__(current_type_t* value) {
18573  return xtd::as<new_type_t>(value);
18574 }
std::type_info type
Stores information about a type.
Definition: types.h:217
slong as< slong >(std::any value)
Casts a type into another type.
Definition: as.h:10768
static std::wstring to_wstring(const std::string &str) noexcept
Converts std::string to std::wstring.
Contains xtd fundamental types.
static uint64 to_uint64(std::any value)
Convert std::any to uint64.
static ustring to_string(std::any value)
Convert std::any to ustring.
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition: types.h:173
double as< double >(std::any value)
Casts a type into another type.
Definition: as.h:6962
int32 as< int32 >(std::any value)
Casts a type into another type.
Definition: as.h:9228
char as< char >(std::any value)
Casts a type into another type.
Definition: as.h:2478
static const std::string & to_string(const std::string &str) noexcept
Converts std::string to std::string.
long double decimal
Represents a decimal-precision floating-point number.
Definition: types.h:96
wchar as< wchar >(std::any value)
Casts a type into another type.
Definition: as.h:5466
Contains xtd::convert class.
char16 as< char16 >(std::any value)
Casts a type into another type.
Definition: as.h:3970
int16 as< int16 >(std::any value)
Casts a type into another type.
Definition: as.h:8458
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
static std::u32string to_u32string(const std::string &str) noexcept
Converts std::string to std::u32string.
static int32 to_int32(std::any value)
Convert std::any to int32.
uint16 as< uint16 >(std::any value)
Casts a type into another type.
Definition: as.h:12308
#define csf_
Provides information about the current stack frame.
Definition: current_stack_frame.h:30
uint32 as< uint32 >(std::any value)
Casts a type into another type.
Definition: as.h:13078
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition: types.h:228
static wchar to_wchar(std::any value)
Convert std::any to wchar.
float as< float >(std::any value)
Casts a type into another type.
Definition: as.h:7710
uint64 as< uint64 >(std::any value)
Casts a type into another type.
Definition: as.h:13848
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
static int16 to_int16(std::any value)
Convert std::any to int16.
static slong to_llong(std::any value)
Convert std::any to slong.
static sbyte to_sbyte(std::any value)
Convert std::any to sbyte.
static std::u8string to_u8string(const std::string &str) noexcept
Converts std::string to std::u8string.
Contains std::any type and std::bad_any_cast exception.
static bool to_boolean(std::any value)
Convert std::any to bool.
static char to_char(std::any value)
Convert std::any to char.
new_type_t as(std::any value)
Casts a type into another type.
Definition: as.h:37
static char8 to_char8(std::any value)
Convert std::any to char8.
static double to_double(std::any value)
Convert std::any to double.
static float to_single(std::any value)
Convert std::any to single.
static decimal to_decimal(std::any value)
Convert std::any to decimal.
decimal as< decimal >(std::any value)
Casts a type into another type.
Definition: as.h:6214
static xtd::ulong to_ullong(type_t value) noexcept
Convert type_t to xtd::ulong.
Definition: convert.h:4871
int64 as< int64 >(std::any value)
Casts a type into another type.
Definition: as.h:9998
static xtd::byte to_byte(std::any value)
Convert std::any to byte.
static uint32 to_uint32(std::any value)
Convert std::any to uint32.
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition: types.h:206
static uint16 to_uint16(std::any value)
Convert std::any to uint16.
static xtd::ustring to_ustring(const std::string &str) noexcept
Converts std::string to xtd::ustring.
Contains xtd::convert_string class.
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
int_least16_t int16
Represents a 16-bit signed integer.
Definition: types.h:118
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
ustring as< ustring >(std::any value)
Casts a type into another type.
Definition: as.h:15388
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
static char16 to_char16(std::any value)
Convert std::any to char16.
static char32 to_char32(std::any value)
Convert std::any to char32.
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition: types.h:272
The exception that is thrown for invalid casting or explicit conversion.
Definition: invalid_cast_exception.h:18
Contains xtd::invalid_cast_exception exception.
char32 as< char32 >(std::any value)
Casts a type into another type.
Definition: as.h:4718
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition: types.h:250
char8_t char8
Represents a 8-bit unicode character.
Definition: types.h:62
int_least64_t int64
Represents a 64-bit signed integer.
Definition: types.h:140
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition: types.h:39
static int64 to_int64(std::any value)
Convert std::any to int64.
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
static std::u16string to_u16string(const std::string &str) noexcept
Converts std::string to std::u16string.
char16_t char16
Represents a 16-bit unicode character.
Definition: types.h:74
bool as< bool >(std::any value)
Casts a type into another type.
Definition: as.h:960
char8 as< char8 >(std::any value)
Casts a type into another type.
Definition: as.h:3227
Contains xtd::convert class.
sbyte as< sbyte >(std::any value)
Casts a type into another type.
Definition: as.h:11538
wchar_t wchar
Represents a wide character.
Definition: types.h:284