xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
as.h
Go to the documentation of this file.
1
3#pragma once
4#include <any>
5#include <memory>
6#include "convert.h"
7#include "convert_pointer.h"
8#include "convert_string.h"
10#include "types.h"
11
13namespace xtd {
14 // ___________________________________________________________________________________________
15 // generic
16
31 template<typename new_type_t>
32 new_type_t as(std::any value) {
33 try {
34 return any_cast<new_type_t>(value);
35 } catch (const std::exception& e) {
36 throw invalid_cast_exception(e.what(), csf_);
37 }
38 }
39
53 template<typename new_type_t>
54 new_type_t as(bool value) {
55 return static_cast<new_type_t>(value);
56 }
57
71 template<typename new_type_t>
72 new_type_t as(byte_t value) {
73 return static_cast<new_type_t>(value);
74 }
75
89 template<typename new_type_t>
90 new_type_t as(char value) {
91 return static_cast<new_type_t>(value);
92 }
93
107 template<typename new_type_t>
108 new_type_t as(char8_t value) {
109 return static_cast<new_type_t>(value);
110 }
111
125 template<typename new_type_t>
126 new_type_t as(char16_t value) {
127 return static_cast<new_type_t>(value);
128 }
129
143 template<typename new_type_t>
144 new_type_t as(char32_t value) {
145 return static_cast<new_type_t>(value);
146 }
147
161 template<typename new_type_t>
162 new_type_t as(wchar_t value) {
163 return static_cast<new_type_t>(value);
164 }
165
179 template<typename new_type_t>
180 new_type_t as(decimal_t value) {
181 return static_cast<new_type_t>(value);
182 }
183
197 template<typename new_type_t>
198 new_type_t as(double value) {
199 return static_cast<new_type_t>(value);
200 }
201
215 template<typename new_type_t>
216 new_type_t as(float value) {
217 return static_cast<new_type_t>(value);
218 }
219
233 template<typename new_type_t>
234 new_type_t as(int16_t value) {
235 return static_cast<new_type_t>(value);
236 }
237
251 template<typename new_type_t>
252 new_type_t as(int32_t value) {
253 return static_cast<new_type_t>(value);
254 }
255
269 template<typename new_type_t>
270 new_type_t as(int64_t value) {
271 return static_cast<new_type_t>(value);
272 }
273
287 template<typename new_type_t>
288 new_type_t as(llong_t value) {
289 return static_cast<new_type_t>(value);
290 }
291
305 template<typename new_type_t>
306 new_type_t as(sbyte_t value) {
307 return static_cast<new_type_t>(value);
308 }
309
323 template<typename new_type_t>
324 new_type_t as(uint16_t value) {
325 return static_cast<new_type_t>(value);
326 }
327
341 template<typename new_type_t>
342 new_type_t as(uint32_t value) {
343 return static_cast<new_type_t>(value);
344 }
345
359 template<typename new_type_t>
360 new_type_t as(uint64_t value) {
361 return static_cast<new_type_t>(value);
362 }
363
377 template<typename new_type_t>
378 new_type_t as(ullong_t value) {
379 return static_cast<new_type_t>(value);
380 }
381
396 template<typename new_type_t>
397 new_type_t as(const xtd::ustring& value) {
398 try {
399 return dynamic_cast<const new_type_t&>(value);
400 } catch (const std::exception& e) {
401 throw invalid_cast_exception(e.what(), csf_);
402 }
403 throw std::bad_cast();
404 }
405
420 template<typename new_type_t>
421 new_type_t as(xtd::ustring& value) {
422 try {
423 return dynamic_cast<new_type_t&>(value);
424 } catch (const std::exception& e) {
425 throw invalid_cast_exception(e.what(), csf_);
426 }
427 throw std::bad_cast();
428 }
429
431 template<typename new_type_t>
432 new_type_t as(const xtd::ustring& value, byte_t from_base) {
433 throw invalid_cast_exception(csf_);
434 }
435 template<typename new_type_t>
436 new_type_t as(byte_t value, byte_t from_base) {
437 throw invalid_cast_exception(csf_);
438 }
439 template<typename new_type_t>
440 new_type_t as(int16_t value, byte_t from_base) {
441 throw invalid_cast_exception(csf_);
442 }
443 template<typename new_type_t>
444 new_type_t as(int32_t value, byte_t from_base) {
445 throw invalid_cast_exception(csf_);
446 }
447 template<typename new_type_t>
448 new_type_t as(int64_t value, byte_t from_base) {
449 throw invalid_cast_exception(csf_);
450 }
451 template<typename new_type_t>
452 new_type_t as(llong_t value, byte_t from_base) {
453 throw invalid_cast_exception(csf_);
454 }
455 template<typename new_type_t>
456 new_type_t as(sbyte_t value, byte_t from_base) {
457 throw invalid_cast_exception(csf_);
458 }
459 template<typename new_type_t>
460 new_type_t as(uint16_t value, byte_t from_base) {
461 throw invalid_cast_exception(csf_);
462 }
463 template<typename new_type_t>
464 new_type_t as(uint32_t value, byte_t from_base) {
465 throw invalid_cast_exception(csf_);
466 }
467 template<typename new_type_t>
468 new_type_t as(uint64_t value, byte_t from_base) {
469 throw invalid_cast_exception(csf_);
470 }
471 template<typename new_type_t>
472 new_type_t as(ullong_t value, byte_t from_base) {
473 throw invalid_cast_exception(csf_);
474 }
476
486 template<typename new_type_t>
487 new_type_t as(const std::string& value) {
488 try {
489 return dynamic_cast<const new_type_t&>(value);
490 } catch (const std::exception& e) {
491 throw invalid_cast_exception(e.what(), csf_);
492 }
493 throw std::bad_cast();
494 }
495
505 template<typename new_type_t>
506 new_type_t as(std::string& value) {
507 try {
508 return dynamic_cast<new_type_t&>(value);
509 } catch (const std::exception& e) {
510 throw invalid_cast_exception(e.what(), csf_);
511 }
512 throw std::bad_cast();
513 }
514
524 template<typename new_type_t>
525 new_type_t as(const std::u8string& value) {
526 try {
527 return dynamic_cast<const new_type_t&>(value);
528 } catch (const std::exception& e) {
529 throw invalid_cast_exception(e.what(), csf_);
530 }
531 throw std::bad_cast();
532 }
533
543 template<typename new_type_t>
544 new_type_t as(std::u8string& value) {
545 try {
546 return dynamic_cast<new_type_t&>(value);
547 } catch (const std::exception& e) {
548 throw invalid_cast_exception(e.what(), csf_);
549 }
550 throw std::bad_cast();
551 }
552
562 template<typename new_type_t>
563 new_type_t as(const std::u16string& value) {
564 try {
565 return dynamic_cast<const new_type_t&>(value);
566 } catch (const std::exception& e) {
567 throw invalid_cast_exception(e.what(), csf_);
568 }
569 throw std::bad_cast();
570 }
571
581 template<typename new_type_t>
582 new_type_t as(std::u16string& value) {
583 try {
584 return dynamic_cast<new_type_t&>(value);
585 } catch (const std::exception& e) {
586 throw invalid_cast_exception(e.what(), csf_);
587 }
588 throw std::bad_cast();
589 }
590
600 template<typename new_type_t>
601 new_type_t as(const std::u32string& value) {
602 try {
603 return dynamic_cast<const new_type_t&>(value);
604 } catch (const std::exception& e) {
605 throw invalid_cast_exception(e.what(), csf_);
606 }
607 throw std::bad_cast();
608 }
609
619 template<typename new_type_t>
620 new_type_t as(std::u32string& value) {
621 try {
622 return dynamic_cast<new_type_t&>(value);
623 } catch (const std::exception& e) {
624 throw invalid_cast_exception(e.what(), csf_);
625 }
626 throw std::bad_cast();
627 }
628
638 template<typename new_type_t>
639 new_type_t as(const std::wstring& value) {
640 try {
641 return dynamic_cast<const new_type_t&>(value);
642 } catch (const std::exception& e) {
643 throw invalid_cast_exception(e.what(), csf_);
644 }
645 throw std::bad_cast();
646 }
647
657 template<typename new_type_t>
658 new_type_t as(std::wstring& value) {
659 try {
660 return dynamic_cast<new_type_t&>(value);
661 } catch (const std::exception& e) {
662 throw invalid_cast_exception(e.what(), csf_);
663 }
664 throw std::bad_cast();
665 }
666
680 template<typename new_type_t>
681 new_type_t as(const char* value) {
682 return reinterpret_cast<new_type_t>(value);
683 }
684
698 template<typename new_type_t>
699 new_type_t as(char* value) {
700 return reinterpret_cast<new_type_t>(value);
701 }
702
716 template<typename new_type_t>
717 new_type_t as(const char8_t* value) {
718 return reinterpret_cast<new_type_t>(value);
719 }
720
734 template<typename new_type_t>
735 new_type_t as(char8_t* value) {
736 return reinterpret_cast<new_type_t>(value);
737 }
738
752 template<typename new_type_t>
753 new_type_t as(const char16_t* value) {
754 return reinterpret_cast<new_type_t>(value);
755 }
756
770 template<typename new_type_t>
771 new_type_t as(char16_t* value) {
772 return reinterpret_cast<new_type_t>(value);
773 }
774
788 template<typename new_type_t>
789 new_type_t as(const char32_t* value) {
790 return reinterpret_cast<new_type_t>(value);
791 }
792
806 template<typename new_type_t>
807 new_type_t as(char32_t* value) {
808 return reinterpret_cast<new_type_t>(value);
809 }
810
824 template<typename new_type_t>
825 new_type_t as(const wchar_t* value) {
826 return reinterpret_cast<new_type_t>(value);
827 }
828
842 template<typename new_type_t>
843 new_type_t as(wchar_t* value) {
844 return reinterpret_cast<new_type_t>(value);
845 }
846
847 // ___________________________________________________________________________________________
848 // xtd::convert specialization
849
864 template<>
865 inline bool as<bool>(std::any value) {
866 return xtd::convert::to_boolean(value);
867 }
868
882 template<>
883 inline bool as<bool>(bool value) {
884 return xtd::convert::to_boolean(value);
885 }
886
900 template<>
901 inline bool as<bool>(byte_t value) {
902 return xtd::convert::to_boolean(value);
903 }
904
919 template<>
920 inline bool as<bool>(char value) {
921 return xtd::convert::to_boolean(value);
922 }
923
938 template<>
939 inline bool as<bool>(char8_t value) {
940 return xtd::convert::to_boolean(value);
941 }
942
957 template<>
958 inline bool as<bool>(char16_t value) {
959 return xtd::convert::to_boolean(value);
960 }
961
976 template<>
977 inline bool as<bool>(char32_t value) {
978 return xtd::convert::to_boolean(value);
979 }
980
995 template<>
996 inline bool as<bool>(wchar_t value) {
997 return xtd::convert::to_boolean(value);
998 }
999
1013 template<>
1014 inline bool as<bool>(decimal_t value) {
1015 return xtd::convert::to_boolean(value);
1016 }
1017
1031 template<>
1032 inline bool as<bool>(double value) {
1033 return xtd::convert::to_boolean(value);
1034 }
1035
1049 template<>
1050 inline bool as<bool>(float value) {
1051 return xtd::convert::to_boolean(value);
1052 }
1053
1067 template<>
1068 inline bool as<bool>(int16_t value) {
1069 return xtd::convert::to_boolean(value);
1070 }
1071
1085 template<>
1086 inline bool as<bool>(int32_t value) {
1087 return xtd::convert::to_boolean(value);
1088 }
1089
1103 template<>
1104 inline bool as<bool>(int64_t value) {
1105 return xtd::convert::to_boolean(value);
1106 }
1107
1121 template<>
1122 inline bool as<bool>(llong_t value) {
1123 return xtd::convert::to_boolean(value);
1124 }
1125
1139 template<>
1140 inline bool as<bool>(sbyte_t value) {
1141 return xtd::convert::to_boolean(value);
1142 }
1143
1157 template<>
1158 inline bool as<bool>(uint16_t value) {
1159 return xtd::convert::to_boolean(value);
1160 }
1161
1175 template<>
1176 inline bool as<bool>(uint32_t value) {
1177 return xtd::convert::to_boolean(value);
1178 }
1179
1193 template<>
1194 inline bool as<bool>(uint64_t value) {
1195 return xtd::convert::to_boolean(value);
1196 }
1197
1211 template<>
1212 inline bool as<bool>(ullong_t value) {
1213 return xtd::convert::to_boolean(value);
1214 }
1215
1230 template<>
1231 inline bool as<bool>(const xtd::ustring& value) {
1232 return xtd::convert::to_boolean(value);
1233 }
1234
1249 template<>
1250 inline bool as<bool>(const std::string& value) {
1251 return xtd::convert::to_boolean(value);
1252 }
1253
1268 template<>
1269 inline bool as<bool>(const std::u8string& value) {
1270 return xtd::convert::to_boolean(value);
1271 }
1272
1287 template<>
1288 inline bool as<bool>(const std::u16string& value) {
1289 return xtd::convert::to_boolean(value);
1290 }
1291
1306 template<>
1307 inline bool as<bool>(const std::u32string& value) {
1308 return xtd::convert::to_boolean(value);
1309 }
1310
1325 template<>
1326 inline bool as<bool>(const std::wstring& value) {
1327 return xtd::convert::to_boolean(value);
1328 }
1329
1344 template<>
1345 inline bool as<bool>(const char* value) {
1346 return xtd::convert::to_boolean(value);
1347 }
1348
1363 template<>
1364 inline bool as<bool>(char* value) {
1365 return xtd::convert::to_boolean(value);
1366 }
1367
1382 template<>
1383 inline bool as<bool>(const char8_t* value) {
1384 return xtd::convert::to_boolean(value);
1385 }
1386
1401 template<>
1402 inline bool as<bool>(char8_t* value) {
1403 return xtd::convert::to_boolean(value);
1404 }
1405
1420 template<>
1421 inline bool as<bool>(const char16_t* value) {
1422 return xtd::convert::to_boolean(value);
1423 }
1424
1439 template<>
1440 inline bool as<bool>(char16_t* value) {
1441 return xtd::convert::to_boolean(value);
1442 }
1443
1458 template<>
1459 inline bool as<bool>(const char32_t* value) {
1460 return xtd::convert::to_boolean(value);
1461 }
1462
1477 template<>
1478 inline bool as<bool>(char32_t* value) {
1479 return xtd::convert::to_boolean(value);
1480 }
1481
1496 template<>
1497 inline bool as<bool>(const wchar_t* value) {
1498 return xtd::convert::to_boolean(value);
1499 }
1500
1515 template<>
1516 inline bool as<bool>(wchar_t* value) {
1517 return xtd::convert::to_boolean(value);
1518 }
1519
1534 template<>
1535 inline byte_t as<byte_t>(std::any value) {
1536 return xtd::convert::to_byte(value);
1537 }
1538
1552 template<>
1553 inline byte_t as<byte_t>(bool value) {
1554 return xtd::convert::to_byte(value);
1555 }
1556
1570 template<>
1571 inline byte_t as<byte_t>(byte_t value) {
1572 return xtd::convert::to_byte(value);
1573 }
1574
1589 template<>
1590 inline byte_t as<byte_t>(char value) {
1591 return xtd::convert::to_byte(value);
1592 }
1593
1608 template<>
1609 inline byte_t as<byte_t>(char8_t value) {
1610 return xtd::convert::to_byte(value);
1611 }
1612
1627 template<>
1628 inline byte_t as<byte_t>(char16_t value) {
1629 return xtd::convert::to_byte(value);
1630 }
1631
1646 template<>
1647 inline byte_t as<byte_t>(char32_t value) {
1648 return xtd::convert::to_byte(value);
1649 }
1650
1665 template<>
1666 inline byte_t as<byte_t>(wchar_t value) {
1667 return xtd::convert::to_byte(value);
1668 }
1669
1683 template<>
1684 inline byte_t as<byte_t>(decimal_t value) {
1685 return xtd::convert::to_byte(value);
1686 }
1687
1701 template<>
1702 inline byte_t as<byte_t>(double value) {
1703 return xtd::convert::to_byte(value);
1704 }
1705
1719 template<>
1720 inline byte_t as<byte_t>(float value) {
1721 return xtd::convert::to_byte(value);
1722 }
1723
1737 template<>
1738 inline byte_t as<byte_t>(int16_t value) {
1739 return xtd::convert::to_byte(value);
1740 }
1741
1755 template<>
1756 inline byte_t as<byte_t>(int32_t value) {
1757 return xtd::convert::to_byte(value);
1758 }
1759
1773 template<>
1774 inline byte_t as<byte_t>(int64_t value) {
1775 return xtd::convert::to_byte(value);
1776 }
1777
1791 template<>
1792 inline byte_t as<byte_t>(llong_t value) {
1793 return xtd::convert::to_byte(value);
1794 }
1795
1809 template<>
1810 inline byte_t as<byte_t>(sbyte_t value) {
1811 return xtd::convert::to_byte(value);
1812 }
1813
1827 template<>
1828 inline byte_t as<byte_t>(uint16_t value) {
1829 return xtd::convert::to_byte(value);
1830 }
1831
1845 template<>
1846 inline byte_t as<byte_t>(uint32_t value) {
1847 return xtd::convert::to_byte(value);
1848 }
1849
1863 template<>
1864 inline byte_t as<byte_t>(uint64_t value) {
1865 return xtd::convert::to_byte(value);
1866 }
1867
1881 template<>
1882 inline byte_t as<byte_t>(ullong_t value) {
1883 return xtd::convert::to_byte(value);
1884 }
1885
1900 template<>
1901 inline byte_t as<byte_t>(const xtd::ustring& value) {
1902 return xtd::convert::to_byte(value);
1903 }
1904
1920 template<>
1921 inline byte_t as<byte_t>(const xtd::ustring& value, byte_t from_base) {
1922 return xtd::convert::to_byte(value, from_base);
1923 }
1924
1939 template<>
1940 inline byte_t as<byte_t>(const std::string& value) {
1941 return xtd::convert::to_byte(value);
1942 }
1943
1958 template<>
1959 inline byte_t as<byte_t>(const std::u8string& value) {
1960 return xtd::convert::to_byte(value);
1961 }
1962
1977 template<>
1978 inline byte_t as<byte_t>(const std::u16string& value) {
1979 return xtd::convert::to_byte(value);
1980 }
1981
1996 template<>
1997 inline byte_t as<byte_t>(const std::u32string& value) {
1998 return xtd::convert::to_byte(value);
1999 }
2000
2015 template<>
2016 inline byte_t as<byte_t>(const std::wstring& value) {
2017 return xtd::convert::to_byte(value);
2018 }
2019
2034 template<>
2035 inline byte_t as<byte_t>(const char* value) {
2036 return xtd::convert::to_byte(value);
2037 }
2038
2053 template<>
2054 inline byte_t as<byte_t>(char* value) {
2055 return xtd::convert::to_byte(value);
2056 }
2057
2072 template<>
2073 inline byte_t as<byte_t>(const char8_t* value) {
2074 return xtd::convert::to_byte(value);
2075 }
2076
2091 template<>
2092 inline byte_t as<byte_t>(char8_t* value) {
2093 return xtd::convert::to_byte(value);
2094 }
2095
2110 template<>
2111 inline byte_t as<byte_t>(const char16_t* value) {
2112 return xtd::convert::to_byte(value);
2113 }
2114
2129 template<>
2130 inline byte_t as<byte_t>(char16_t* value) {
2131 return xtd::convert::to_byte(value);
2132 }
2133
2148 template<>
2149 inline byte_t as<byte_t>(const char32_t* value) {
2150 return xtd::convert::to_byte(value);
2151 }
2152
2167 template<>
2168 inline byte_t as<byte_t>(char32_t* value) {
2169 return xtd::convert::to_byte(value);
2170 }
2171
2186 template<>
2187 inline byte_t as<byte_t>(const wchar_t* value) {
2188 return xtd::convert::to_byte(value);
2189 }
2190
2205 template<>
2206 inline byte_t as<byte_t>(wchar_t* value) {
2207 return xtd::convert::to_byte(value);
2208 }
2209
2224 template<>
2225 inline char as<char>(std::any value) {
2226 return xtd::convert::to_char(value);
2227 }
2228
2242 template<>
2243 inline char as<char>(bool value) {
2244 return xtd::convert::to_char(value);
2245 }
2246
2260 template<>
2261 inline char as<char>(byte_t value) {
2262 return xtd::convert::to_char(value);
2263 }
2264
2279 template<>
2280 inline char as<char>(char value) {
2281 return xtd::convert::to_char(value);
2282 }
2283
2298 template<>
2299 inline char as<char>(char8_t value) {
2300 return xtd::convert::to_char(value);
2301 }
2302
2317 template<>
2318 inline char as<char>(char16_t value) {
2319 return xtd::convert::to_char(value);
2320 }
2321
2336 template<>
2337 inline char as<char>(char32_t value) {
2338 return xtd::convert::to_char(value);
2339 }
2340
2355 template<>
2356 inline char as<char>(wchar_t value) {
2357 return xtd::convert::to_char(value);
2358 }
2359
2373 template<>
2374 inline char as<char>(decimal_t value) {
2375 return xtd::convert::to_char(value);
2376 }
2377
2391 template<>
2392 inline char as<char>(double value) {
2393 return xtd::convert::to_char(value);
2394 }
2395
2409 template<>
2410 inline char as<char>(float value) {
2411 return xtd::convert::to_char(value);
2412 }
2413
2427 template<>
2428 inline char as<char>(int16_t value) {
2429 return xtd::convert::to_char(value);
2430 }
2431
2445 template<>
2446 inline char as<char>(int32_t value) {
2447 return xtd::convert::to_char(value);
2448 }
2449
2463 template<>
2464 inline char as<char>(int64_t value) {
2465 return xtd::convert::to_char(value);
2466 }
2467
2481 template<>
2482 inline char as<char>(llong_t value) {
2483 return xtd::convert::to_char(value);
2484 }
2485
2499 template<>
2500 inline char as<char>(sbyte_t value) {
2501 return xtd::convert::to_char(value);
2502 }
2503
2517 template<>
2518 inline char as<char>(uint16_t value) {
2519 return xtd::convert::to_char(value);
2520 }
2521
2535 template<>
2536 inline char as<char>(uint32_t value) {
2537 return xtd::convert::to_char(value);
2538 }
2539
2553 template<>
2554 inline char as<char>(uint64_t value) {
2555 return xtd::convert::to_char(value);
2556 }
2557
2571 template<>
2572 inline char as<char>(ullong_t value) {
2573 return xtd::convert::to_char(value);
2574 }
2575
2590 template<>
2591 inline char as<char>(const xtd::ustring& value) {
2592 return xtd::convert::to_char(value);
2593 }
2594
2609 template<>
2610 inline char as<char>(const std::string& value) {
2611 return xtd::convert::to_char(value);
2612 }
2613
2628 template<>
2629 inline char as<char>(const std::u8string& value) {
2630 return xtd::convert::to_char(value);
2631 }
2632
2647 template<>
2648 inline char as<char>(const std::u16string& value) {
2649 return xtd::convert::to_char(value);
2650 }
2651
2666 template<>
2667 inline char as<char>(const std::u32string& value) {
2668 return xtd::convert::to_char(value);
2669 }
2670
2685 template<>
2686 inline char as<char>(const std::wstring& value) {
2687 return xtd::convert::to_char(value);
2688 }
2689
2704 template<>
2705 inline char as<char>(const char* value) {
2706 return xtd::convert::to_char(value);
2707 }
2708
2723 template<>
2724 inline char as<char>(char* value) {
2725 return xtd::convert::to_char(value);
2726 }
2727
2742 template<>
2743 inline char as<char>(const char8_t* value) {
2744 return xtd::convert::to_char(value);
2745 }
2746
2761 template<>
2762 inline char as<char>(char8_t* value) {
2763 return xtd::convert::to_char(value);
2764 }
2765
2780 template<>
2781 inline char as<char>(const char16_t* value) {
2782 return xtd::convert::to_char(value);
2783 }
2784
2799 template<>
2800 inline char as<char>(char16_t* value) {
2801 return xtd::convert::to_char(value);
2802 }
2803
2818 template<>
2819 inline char as<char>(const char32_t* value) {
2820 return xtd::convert::to_char(value);
2821 }
2822
2837 template<>
2838 inline char as<char>(char32_t* value) {
2839 return xtd::convert::to_char(value);
2840 }
2841
2856 template<>
2857 inline char as<char>(const wchar_t* value) {
2858 return xtd::convert::to_char(value);
2859 }
2860
2875 template<>
2876 inline char as<char>(wchar_t* value) {
2877 return xtd::convert::to_char(value);
2878 }
2879
2894 template<>
2895 inline char8_t as<char8_t>(std::any value) {
2896 return xtd::convert::to_char8(value);
2897 }
2898
2912 template<>
2913 inline char8_t as<char8_t>(bool value) {
2914 return xtd::convert::to_char8(value);
2915 }
2916
2930 template<>
2931 inline char8_t as<char8_t>(byte_t value) {
2932 return xtd::convert::to_char8(value);
2933 }
2934
2949 template<>
2950 inline char8_t as<char8_t>(char value) {
2951 return xtd::convert::to_char8(value);
2952 }
2953
2968 template<>
2969 inline char8_t as<char8_t>(char8_t value) {
2970 return xtd::convert::to_char8(value);
2971 }
2972
2987 template<>
2988 inline char8_t as<char8_t>(char16_t value) {
2989 return xtd::convert::to_char8(value);
2990 }
2991
3006 template<>
3007 inline char8_t as<char8_t>(char32_t value) {
3008 return xtd::convert::to_char8(value);
3009 }
3010
3025 template<>
3026 inline char8_t as<char8_t>(wchar_t value) {
3027 return xtd::convert::to_char8(value);
3028 }
3029
3043 template<>
3044 inline char8_t as<char8_t>(decimal_t value) {
3045 return xtd::convert::to_char8(value);
3046 }
3047
3061 template<>
3062 inline char8_t as<char8_t>(double value) {
3063 return xtd::convert::to_char8(value);
3064 }
3065
3079 template<>
3080 inline char8_t as<char8_t>(float value) {
3081 return xtd::convert::to_char8(value);
3082 }
3083
3097 template<>
3098 inline char8_t as<char8_t>(int16_t value) {
3099 return xtd::convert::to_char8(value);
3100 }
3101
3115 template<>
3116 inline char8_t as<char8_t>(int32_t value) {
3117 return xtd::convert::to_char8(value);
3118 }
3119
3133 template<>
3134 inline char8_t as<char8_t>(int64_t value) {
3135 return xtd::convert::to_char8(value);
3136 }
3137
3151 template<>
3152 inline char8_t as<char8_t>(llong_t value) {
3153 return xtd::convert::to_char8(value);
3154 }
3155
3169 template<>
3170 inline char8_t as<char8_t>(sbyte_t value) {
3171 return xtd::convert::to_char8(value);
3172 }
3173
3187 template<>
3188 inline char8_t as<char8_t>(uint16_t value) {
3189 return xtd::convert::to_char8(value);
3190 }
3191
3205 template<>
3206 inline char8_t as<char8_t>(uint32_t value) {
3207 return xtd::convert::to_char8(value);
3208 }
3209
3223 template<>
3224 inline char8_t as<char8_t>(uint64_t value) {
3225 return xtd::convert::to_char8(value);
3226 }
3227
3241 template<>
3242 inline char8_t as<char8_t>(ullong_t value) {
3243 return xtd::convert::to_char8(value);
3244 }
3245
3260 template<>
3261 inline char8_t as<char8_t>(const xtd::ustring& value) {
3262 return xtd::convert::to_char8(value);
3263 }
3264
3279 template<>
3280 inline char8_t as<char8_t>(const std::string& value) {
3281 return xtd::convert::to_char8(value);
3282 }
3283
3298 template<>
3299 inline char8_t as<char8_t>(const std::u8string& value) {
3300 return xtd::convert::to_char8(value);
3301 }
3302
3317 template<>
3318 inline char8_t as<char8_t>(const std::u16string& value) {
3319 return xtd::convert::to_char8(value);
3320 }
3321
3336 template<>
3337 inline char8_t as<char8_t>(const std::u32string& value) {
3338 return xtd::convert::to_char8(value);
3339 }
3340
3355 template<>
3356 inline char8_t as<char8_t>(const std::wstring& value) {
3357 return xtd::convert::to_char8(value);
3358 }
3359
3374 template<>
3375 inline char8_t as<char8_t>(const char* value) {
3376 return xtd::convert::to_char8(value);
3377 }
3378
3393 template<>
3394 inline char8_t as<char8_t>(char* value) {
3395 return xtd::convert::to_char8(value);
3396 }
3397
3412 template<>
3413 inline char8_t as<char8_t>(const char8_t* value) {
3414 return xtd::convert::to_char8(value);
3415 }
3416
3431 template<>
3432 inline char8_t as<char8_t>(char8_t* value) {
3433 return xtd::convert::to_char8(value);
3434 }
3435
3450 template<>
3451 inline char8_t as<char8_t>(const char16_t* value) {
3452 return xtd::convert::to_char8(value);
3453 }
3454
3469 template<>
3470 inline char8_t as<char8_t>(char16_t* value) {
3471 return xtd::convert::to_char8(value);
3472 }
3473
3488 template<>
3489 inline char8_t as<char8_t>(const char32_t* value) {
3490 return xtd::convert::to_char8(value);
3491 }
3492
3507 template<>
3508 inline char8_t as<char8_t>(char32_t* value) {
3509 return xtd::convert::to_char8(value);
3510 }
3511
3526 template<>
3527 inline char8_t as<char8_t>(const wchar_t* value) {
3528 return xtd::convert::to_char8(value);
3529 }
3530
3545 template<>
3546 inline char8_t as<char8_t>(wchar_t* value) {
3547 return xtd::convert::to_char8(value);
3548 }
3549
3564 template<>
3565 inline char16_t as<char16_t>(std::any value) {
3566 return xtd::convert::to_char16(value);
3567 }
3568
3582 template<>
3583 inline char16_t as<char16_t>(bool value) {
3584 return xtd::convert::to_char16(value);
3585 }
3586
3600 template<>
3601 inline char16_t as<char16_t>(byte_t value) {
3602 return xtd::convert::to_char16(value);
3603 }
3604
3619 template<>
3620 inline char16_t as<char16_t>(char value) {
3621 return xtd::convert::to_char16(value);
3622 }
3623
3638 template<>
3639 inline char16_t as<char16_t>(char8_t value) {
3640 return xtd::convert::to_char16(value);
3641 }
3642
3657 template<>
3658 inline char16_t as<char16_t>(char16_t value) {
3659 return xtd::convert::to_char16(value);
3660 }
3661
3676 template<>
3677 inline char16_t as<char16_t>(char32_t value) {
3678 return xtd::convert::to_char16(value);
3679 }
3680
3695 template<>
3696 inline char16_t as<char16_t>(wchar_t value) {
3697 return xtd::convert::to_char16(value);
3698 }
3699
3713 template<>
3714 inline char16_t as<char16_t>(decimal_t value) {
3715 return xtd::convert::to_char16(value);
3716 }
3717
3731 template<>
3732 inline char16_t as<char16_t>(double value) {
3733 return xtd::convert::to_char16(value);
3734 }
3735
3749 template<>
3750 inline char16_t as<char16_t>(float value) {
3751 return xtd::convert::to_char16(value);
3752 }
3753
3767 template<>
3768 inline char16_t as<char16_t>(int16_t value) {
3769 return xtd::convert::to_char16(value);
3770 }
3771
3785 template<>
3786 inline char16_t as<char16_t>(int32_t value) {
3787 return xtd::convert::to_char16(value);
3788 }
3789
3803 template<>
3804 inline char16_t as<char16_t>(int64_t value) {
3805 return xtd::convert::to_char16(value);
3806 }
3807
3821 template<>
3822 inline char16_t as<char16_t>(llong_t value) {
3823 return xtd::convert::to_char16(value);
3824 }
3825
3839 template<>
3840 inline char16_t as<char16_t>(sbyte_t value) {
3841 return xtd::convert::to_char16(value);
3842 }
3843
3857 template<>
3858 inline char16_t as<char16_t>(uint16_t value) {
3859 return xtd::convert::to_char16(value);
3860 }
3861
3875 template<>
3876 inline char16_t as<char16_t>(uint32_t value) {
3877 return xtd::convert::to_char16(value);
3878 }
3879
3893 template<>
3894 inline char16_t as<char16_t>(uint64_t value) {
3895 return xtd::convert::to_char16(value);
3896 }
3897
3911 template<>
3912 inline char16_t as<char16_t>(ullong_t value) {
3913 return xtd::convert::to_char16(value);
3914 }
3915
3930 template<>
3931 inline char16_t as<char16_t>(const xtd::ustring& value) {
3932 return xtd::convert::to_char16(value);
3933 }
3934
3949 template<>
3950 inline char16_t as<char16_t>(const std::string& value) {
3951 return xtd::convert::to_char16(value);
3952 }
3953
3968 template<>
3969 inline char16_t as<char16_t>(const std::u8string& value) {
3970 return xtd::convert::to_char16(value);
3971 }
3972
3987 template<>
3988 inline char16_t as<char16_t>(const std::u16string& value) {
3989 return xtd::convert::to_char16(value);
3990 }
3991
4006 template<>
4007 inline char16_t as<char16_t>(const std::u32string& value) {
4008 return xtd::convert::to_char16(value);
4009 }
4010
4025 template<>
4026 inline char16_t as<char16_t>(const std::wstring& value) {
4027 return xtd::convert::to_char16(value);
4028 }
4029
4044 template<>
4045 inline char16_t as<char16_t>(const char* value) {
4046 return xtd::convert::to_char16(value);
4047 }
4048
4063 template<>
4064 inline char16_t as<char16_t>(char* value) {
4065 return xtd::convert::to_char16(value);
4066 }
4067
4082 template<>
4083 inline char16_t as<char16_t>(const char8_t* value) {
4084 return xtd::convert::to_char16(value);
4085 }
4086
4101 template<>
4102 inline char16_t as<char16_t>(char8_t* value) {
4103 return xtd::convert::to_char16(value);
4104 }
4105
4120 template<>
4121 inline char16_t as<char16_t>(const char16_t* value) {
4122 return xtd::convert::to_char16(value);
4123 }
4124
4139 template<>
4140 inline char16_t as<char16_t>(char16_t* value) {
4141 return xtd::convert::to_char16(value);
4142 }
4143
4158 template<>
4159 inline char16_t as<char16_t>(const char32_t* value) {
4160 return xtd::convert::to_char16(value);
4161 }
4162
4177 template<>
4178 inline char16_t as<char16_t>(char32_t* value) {
4179 return xtd::convert::to_char16(value);
4180 }
4181
4196 template<>
4197 inline char16_t as<char16_t>(const wchar_t* value) {
4198 return xtd::convert::to_char16(value);
4199 }
4200
4215 template<>
4216 inline char16_t as<char16_t>(wchar_t* value) {
4217 return xtd::convert::to_char16(value);
4218 }
4219
4234 template<>
4235 inline char32_t as<char32_t>(std::any value) {
4236 return xtd::convert::to_char32(value);
4237 }
4238
4252 template<>
4253 inline char32_t as<char32_t>(bool value) {
4254 return xtd::convert::to_char32(value);
4255 }
4256
4270 template<>
4271 inline char32_t as<char32_t>(byte_t value) {
4272 return xtd::convert::to_char32(value);
4273 }
4274
4289 template<>
4290 inline char32_t as<char32_t>(char value) {
4291 return xtd::convert::to_char32(value);
4292 }
4293
4308 template<>
4309 inline char32_t as<char32_t>(char8_t value) {
4310 return xtd::convert::to_char32(value);
4311 }
4312
4327 template<>
4328 inline char32_t as<char32_t>(char16_t value) {
4329 return xtd::convert::to_char32(value);
4330 }
4331
4346 template<>
4347 inline char32_t as<char32_t>(char32_t value) {
4348 return xtd::convert::to_char32(value);
4349 }
4350
4365 template<>
4366 inline char32_t as<char32_t>(wchar_t value) {
4367 return xtd::convert::to_char32(value);
4368 }
4369
4383 template<>
4384 inline char32_t as<char32_t>(decimal_t value) {
4385 return xtd::convert::to_char32(value);
4386 }
4387
4401 template<>
4402 inline char32_t as<char32_t>(double value) {
4403 return xtd::convert::to_char32(value);
4404 }
4405
4419 template<>
4420 inline char32_t as<char32_t>(float value) {
4421 return xtd::convert::to_char32(value);
4422 }
4423
4437 template<>
4438 inline char32_t as<char32_t>(int16_t value) {
4439 return xtd::convert::to_char32(value);
4440 }
4441
4455 template<>
4456 inline char32_t as<char32_t>(int32_t value) {
4457 return xtd::convert::to_char32(value);
4458 }
4459
4473 template<>
4474 inline char32_t as<char32_t>(int64_t value) {
4475 return xtd::convert::to_char32(value);
4476 }
4477
4491 template<>
4492 inline char32_t as<char32_t>(llong_t value) {
4493 return xtd::convert::to_char32(value);
4494 }
4495
4509 template<>
4510 inline char32_t as<char32_t>(sbyte_t value) {
4511 return xtd::convert::to_char32(value);
4512 }
4513
4527 template<>
4528 inline char32_t as<char32_t>(uint16_t value) {
4529 return xtd::convert::to_char32(value);
4530 }
4531
4545 template<>
4546 inline char32_t as<char32_t>(uint32_t value) {
4547 return xtd::convert::to_char32(value);
4548 }
4549
4563 template<>
4564 inline char32_t as<char32_t>(uint64_t value) {
4565 return xtd::convert::to_char32(value);
4566 }
4567
4581 template<>
4582 inline char32_t as<char32_t>(ullong_t value) {
4583 return xtd::convert::to_char32(value);
4584 }
4585
4600 template<>
4601 inline char32_t as<char32_t>(const xtd::ustring& value) {
4602 return xtd::convert::to_char32(value);
4603 }
4604
4619 template<>
4620 inline char32_t as<char32_t>(const std::string& value) {
4621 return xtd::convert::to_char32(value);
4622 }
4623
4638 template<>
4639 inline char32_t as<char32_t>(const std::u8string& value) {
4640 return xtd::convert::to_char32(value);
4641 }
4642
4657 template<>
4658 inline char32_t as<char32_t>(const std::u16string& value) {
4659 return xtd::convert::to_char32(value);
4660 }
4661
4676 template<>
4677 inline char32_t as<char32_t>(const std::u32string& value) {
4678 return xtd::convert::to_char32(value);
4679 }
4680
4695 template<>
4696 inline char32_t as<char32_t>(const std::wstring& value) {
4697 return xtd::convert::to_char32(value);
4698 }
4699
4714 template<>
4715 inline char32_t as<char32_t>(const char* value) {
4716 return xtd::convert::to_char32(value);
4717 }
4718
4733 template<>
4734 inline char32_t as<char32_t>(char* value) {
4735 return xtd::convert::to_char32(value);
4736 }
4737
4752 template<>
4753 inline char32_t as<char32_t>(const char8_t* value) {
4754 return xtd::convert::to_char32(value);
4755 }
4756
4771 template<>
4772 inline char32_t as<char32_t>(char8_t* value) {
4773 return xtd::convert::to_char32(value);
4774 }
4775
4790 template<>
4791 inline char32_t as<char32_t>(const char16_t* value) {
4792 return xtd::convert::to_char32(value);
4793 }
4794
4809 template<>
4810 inline char32_t as<char32_t>(char16_t* value) {
4811 return xtd::convert::to_char32(value);
4812 }
4813
4828 template<>
4829 inline char32_t as<char32_t>(const char32_t* value) {
4830 return xtd::convert::to_char32(value);
4831 }
4832
4847 template<>
4848 inline char32_t as<char32_t>(char32_t* value) {
4849 return xtd::convert::to_char32(value);
4850 }
4851
4866 template<>
4867 inline char32_t as<char32_t>(const wchar_t* value) {
4868 return xtd::convert::to_char32(value);
4869 }
4870
4885 template<>
4886 inline char32_t as<char32_t>(wchar_t* value) {
4887 return xtd::convert::to_char32(value);
4888 }
4889
4904 template<>
4905 inline wchar_t as<wchar_t>(std::any value) {
4906 return xtd::convert::to_wchar(value);
4907 }
4908
4922 template<>
4923 inline wchar_t as<wchar_t>(bool value) {
4924 return xtd::convert::to_wchar(value);
4925 }
4926
4940 template<>
4941 inline wchar_t as<wchar_t>(byte_t value) {
4942 return xtd::convert::to_wchar(value);
4943 }
4944
4959 template<>
4960 inline wchar_t as<wchar_t>(char value) {
4961 return xtd::convert::to_wchar(value);
4962 }
4963
4978 template<>
4979 inline wchar_t as<wchar_t>(char8_t value) {
4980 return xtd::convert::to_wchar(value);
4981 }
4982
4997 template<>
4998 inline wchar_t as<wchar_t>(char16_t value) {
4999 return xtd::convert::to_wchar(value);
5000 }
5001
5016 template<>
5017 inline wchar_t as<wchar_t>(char32_t value) {
5018 return xtd::convert::to_wchar(value);
5019 }
5020
5035 template<>
5036 inline wchar_t as<wchar_t>(wchar_t value) {
5037 return xtd::convert::to_wchar(value);
5038 }
5039
5053 template<>
5054 inline wchar_t as<wchar_t>(decimal_t value) {
5055 return xtd::convert::to_wchar(value);
5056 }
5057
5071 template<>
5072 inline wchar_t as<wchar_t>(double value) {
5073 return xtd::convert::to_wchar(value);
5074 }
5075
5089 template<>
5090 inline wchar_t as<wchar_t>(float value) {
5091 return xtd::convert::to_wchar(value);
5092 }
5093
5107 template<>
5108 inline wchar_t as<wchar_t>(int16_t value) {
5109 return xtd::convert::to_wchar(value);
5110 }
5111
5125 template<>
5126 inline wchar_t as<wchar_t>(int32_t value) {
5127 return xtd::convert::to_wchar(value);
5128 }
5129
5143 template<>
5144 inline wchar_t as<wchar_t>(int64_t value) {
5145 return xtd::convert::to_wchar(value);
5146 }
5147
5161 template<>
5162 inline wchar_t as<wchar_t>(llong_t value) {
5163 return xtd::convert::to_wchar(value);
5164 }
5165
5179 template<>
5180 inline wchar_t as<wchar_t>(sbyte_t value) {
5181 return xtd::convert::to_wchar(value);
5182 }
5183
5197 template<>
5198 inline wchar_t as<wchar_t>(uint16_t value) {
5199 return xtd::convert::to_wchar(value);
5200 }
5201
5215 template<>
5216 inline wchar_t as<wchar_t>(uint32_t value) {
5217 return xtd::convert::to_wchar(value);
5218 }
5219
5233 template<>
5234 inline wchar_t as<wchar_t>(uint64_t value) {
5235 return xtd::convert::to_wchar(value);
5236 }
5237
5251 template<>
5252 inline wchar_t as<wchar_t>(ullong_t value) {
5253 return xtd::convert::to_wchar(value);
5254 }
5255
5270 template<>
5271 inline wchar_t as<wchar_t>(const xtd::ustring& value) {
5272 return xtd::convert::to_wchar(value);
5273 }
5274
5289 template<>
5290 inline wchar_t as<wchar_t>(const std::string& value) {
5291 return xtd::convert::to_wchar(value);
5292 }
5293
5308 template<>
5309 inline wchar_t as<wchar_t>(const std::u8string& value) {
5310 return xtd::convert::to_wchar(value);
5311 }
5312
5327 template<>
5328 inline wchar_t as<wchar_t>(const std::u16string& value) {
5329 return xtd::convert::to_wchar(value);
5330 }
5331
5346 template<>
5347 inline wchar_t as<wchar_t>(const std::u32string& value) {
5348 return xtd::convert::to_wchar(value);
5349 }
5350
5365 template<>
5366 inline wchar_t as<wchar_t>(const std::wstring& value) {
5367 return xtd::convert::to_wchar(value);
5368 }
5369
5384 template<>
5385 inline wchar_t as<wchar_t>(const char* value) {
5386 return xtd::convert::to_wchar(value);
5387 }
5388
5403 template<>
5404 inline wchar_t as<wchar_t>(char* value) {
5405 return xtd::convert::to_wchar(value);
5406 }
5407
5422 template<>
5423 inline wchar_t as<wchar_t>(const char8_t* value) {
5424 return xtd::convert::to_wchar(value);
5425 }
5426
5441 template<>
5442 inline wchar_t as<wchar_t>(char8_t* value) {
5443 return xtd::convert::to_wchar(value);
5444 }
5445
5460 template<>
5461 inline wchar_t as<wchar_t>(const char16_t* value) {
5462 return xtd::convert::to_wchar(value);
5463 }
5464
5479 template<>
5480 inline wchar_t as<wchar_t>(char16_t* value) {
5481 return xtd::convert::to_wchar(value);
5482 }
5483
5498 template<>
5499 inline wchar_t as<wchar_t>(const char32_t* value) {
5500 return xtd::convert::to_wchar(value);
5501 }
5502
5517 template<>
5518 inline wchar_t as<wchar_t>(char32_t* value) {
5519 return xtd::convert::to_wchar(value);
5520 }
5521
5536 template<>
5537 inline wchar_t as<wchar_t>(const wchar_t* value) {
5538 return xtd::convert::to_wchar(value);
5539 }
5540
5555 template<>
5556 inline wchar_t as<wchar_t>(wchar_t* value) {
5557 return xtd::convert::to_wchar(value);
5558 }
5559
5574 template<>
5575 inline decimal_t as<decimal_t>(std::any value) {
5576 return xtd::convert::to_decimal(value);
5577 }
5578
5592 template<>
5593 inline decimal_t as<decimal_t>(bool value) {
5594 return xtd::convert::to_decimal(value);
5595 }
5596
5610 template<>
5611 inline decimal_t as<decimal_t>(byte_t value) {
5612 return xtd::convert::to_decimal(value);
5613 }
5614
5629 template<>
5630 inline decimal_t as<decimal_t>(char value) {
5631 return xtd::convert::to_decimal(value);
5632 }
5633
5648 template<>
5649 inline decimal_t as<decimal_t>(char8_t value) {
5650 return xtd::convert::to_decimal(value);
5651 }
5652
5667 template<>
5668 inline decimal_t as<decimal_t>(char16_t value) {
5669 return xtd::convert::to_decimal(value);
5670 }
5671
5686 template<>
5687 inline decimal_t as<decimal_t>(char32_t value) {
5688 return xtd::convert::to_decimal(value);
5689 }
5690
5705 template<>
5706 inline decimal_t as<decimal_t>(wchar_t value) {
5707 return xtd::convert::to_decimal(value);
5708 }
5709
5723 template<>
5724 inline decimal_t as<decimal_t>(decimal_t value) {
5725 return xtd::convert::to_decimal(value);
5726 }
5727
5741 template<>
5742 inline decimal_t as<decimal_t>(double value) {
5743 return xtd::convert::to_decimal(value);
5744 }
5745
5759 template<>
5760 inline decimal_t as<decimal_t>(float value) {
5761 return xtd::convert::to_decimal(value);
5762 }
5763
5777 template<>
5778 inline decimal_t as<decimal_t>(int16_t value) {
5779 return xtd::convert::to_decimal(value);
5780 }
5781
5795 template<>
5796 inline decimal_t as<decimal_t>(int32_t value) {
5797 return xtd::convert::to_decimal(value);
5798 }
5799
5813 template<>
5814 inline decimal_t as<decimal_t>(int64_t value) {
5815 return xtd::convert::to_decimal(value);
5816 }
5817
5831 template<>
5832 inline decimal_t as<decimal_t>(llong_t value) {
5833 return xtd::convert::to_decimal(value);
5834 }
5835
5849 template<>
5850 inline decimal_t as<decimal_t>(sbyte_t value) {
5851 return xtd::convert::to_decimal(value);
5852 }
5853
5867 template<>
5868 inline decimal_t as<decimal_t>(uint16_t value) {
5869 return xtd::convert::to_decimal(value);
5870 }
5871
5885 template<>
5886 inline decimal_t as<decimal_t>(uint32_t value) {
5887 return xtd::convert::to_decimal(value);
5888 }
5889
5903 template<>
5904 inline decimal_t as<decimal_t>(uint64_t value) {
5905 return xtd::convert::to_decimal(value);
5906 }
5907
5921 template<>
5922 inline decimal_t as<decimal_t>(ullong_t value) {
5923 return xtd::convert::to_decimal(value);
5924 }
5925
5940 template<>
5941 inline decimal_t as<decimal_t>(const xtd::ustring& value) {
5942 return xtd::convert::to_decimal(value);
5943 }
5944
5959 template<>
5960 inline decimal_t as<decimal_t>(const std::string& value) {
5961 return xtd::convert::to_decimal(value);
5962 }
5963
5978 template<>
5979 inline decimal_t as<decimal_t>(const std::u8string& value) {
5980 return xtd::convert::to_decimal(value);
5981 }
5982
5997 template<>
5998 inline decimal_t as<decimal_t>(const std::u16string& value) {
5999 return xtd::convert::to_decimal(value);
6000 }
6001
6016 template<>
6017 inline decimal_t as<decimal_t>(const std::u32string& value) {
6018 return xtd::convert::to_decimal(value);
6019 }
6020
6035 template<>
6036 inline decimal_t as<decimal_t>(const std::wstring& value) {
6037 return xtd::convert::to_decimal(value);
6038 }
6039
6054 template<>
6055 inline decimal_t as<decimal_t>(const char* value) {
6056 return xtd::convert::to_decimal(value);
6057 }
6058
6073 template<>
6074 inline decimal_t as<decimal_t>(char* value) {
6075 return xtd::convert::to_decimal(value);
6076 }
6077
6092 template<>
6093 inline decimal_t as<decimal_t>(const char8_t* value) {
6094 return xtd::convert::to_decimal(value);
6095 }
6096
6111 template<>
6112 inline decimal_t as<decimal_t>(char8_t* value) {
6113 return xtd::convert::to_decimal(value);
6114 }
6115
6130 template<>
6131 inline decimal_t as<decimal_t>(const char16_t* value) {
6132 return xtd::convert::to_decimal(value);
6133 }
6134
6149 template<>
6150 inline decimal_t as<decimal_t>(char16_t* value) {
6151 return xtd::convert::to_decimal(value);
6152 }
6153
6168 template<>
6169 inline decimal_t as<decimal_t>(const char32_t* value) {
6170 return xtd::convert::to_decimal(value);
6171 }
6172
6187 template<>
6188 inline decimal_t as<decimal_t>(char32_t* value) {
6189 return xtd::convert::to_decimal(value);
6190 }
6191
6206 template<>
6207 inline decimal_t as<decimal_t>(const wchar_t* value) {
6208 return xtd::convert::to_decimal(value);
6209 }
6210
6225 template<>
6226 inline decimal_t as<decimal_t>(wchar_t* value) {
6227 return xtd::convert::to_decimal(value);
6228 }
6229
6244 template<>
6245 inline double as<double>(std::any value) {
6246 return xtd::convert::to_double(value);
6247 }
6248
6262 template<>
6263 inline double as<double>(bool value) {
6264 return xtd::convert::to_double(value);
6265 }
6266
6280 template<>
6281 inline double as<double>(byte_t value) {
6282 return xtd::convert::to_double(value);
6283 }
6284
6299 template<>
6300 inline double as<double>(char value) {
6301 return xtd::convert::to_double(value);
6302 }
6303
6318 template<>
6319 inline double as<double>(char8_t value) {
6320 return xtd::convert::to_double(value);
6321 }
6322
6337 template<>
6338 inline double as<double>(char16_t value) {
6339 return xtd::convert::to_double(value);
6340 }
6341
6356 template<>
6357 inline double as<double>(char32_t value) {
6358 return xtd::convert::to_double(value);
6359 }
6360
6375 template<>
6376 inline double as<double>(wchar_t value) {
6377 return xtd::convert::to_double(value);
6378 }
6379
6393 template<>
6394 inline double as<double>(decimal_t value) {
6395 return xtd::convert::to_double(value);
6396 }
6397
6411 template<>
6412 inline double as<double>(double value) {
6413 return xtd::convert::to_double(value);
6414 }
6415
6429 template<>
6430 inline double as<double>(float value) {
6431 return xtd::convert::to_double(value);
6432 }
6433
6447 template<>
6448 inline double as<double>(int16_t value) {
6449 return xtd::convert::to_double(value);
6450 }
6451
6465 template<>
6466 inline double as<double>(int32_t value) {
6467 return xtd::convert::to_double(value);
6468 }
6469
6483 template<>
6484 inline double as<double>(int64_t value) {
6485 return xtd::convert::to_double(value);
6486 }
6487
6501 template<>
6502 inline double as<double>(llong_t value) {
6503 return xtd::convert::to_double(value);
6504 }
6505
6519 template<>
6520 inline double as<double>(sbyte_t value) {
6521 return xtd::convert::to_double(value);
6522 }
6523
6537 template<>
6538 inline double as<double>(uint16_t value) {
6539 return xtd::convert::to_double(value);
6540 }
6541
6555 template<>
6556 inline double as<double>(uint32_t value) {
6557 return xtd::convert::to_double(value);
6558 }
6559
6573 template<>
6574 inline double as<double>(uint64_t value) {
6575 return xtd::convert::to_double(value);
6576 }
6577
6591 template<>
6592 inline double as<double>(ullong_t value) {
6593 return xtd::convert::to_double(value);
6594 }
6595
6610 template<>
6611 inline double as<double>(const xtd::ustring& value) {
6612 return xtd::convert::to_double(value);
6613 }
6614
6629 template<>
6630 inline double as<double>(const std::string& value) {
6631 return xtd::convert::to_double(value);
6632 }
6633
6648 template<>
6649 inline double as<double>(const std::u8string& value) {
6650 return xtd::convert::to_double(value);
6651 }
6652
6667 template<>
6668 inline double as<double>(const std::u16string& value) {
6669 return xtd::convert::to_double(value);
6670 }
6671
6686 template<>
6687 inline double as<double>(const std::u32string& value) {
6688 return xtd::convert::to_double(value);
6689 }
6690
6705 template<>
6706 inline double as<double>(const std::wstring& value) {
6707 return xtd::convert::to_double(value);
6708 }
6709
6724 template<>
6725 inline double as<double>(const char* value) {
6726 return xtd::convert::to_double(value);
6727 }
6728
6743 template<>
6744 inline double as<double>(char* value) {
6745 return xtd::convert::to_double(value);
6746 }
6747
6762 template<>
6763 inline double as<double>(const char8_t* value) {
6764 return xtd::convert::to_double(value);
6765 }
6766
6781 template<>
6782 inline double as<double>(char8_t* value) {
6783 return xtd::convert::to_double(value);
6784 }
6785
6800 template<>
6801 inline double as<double>(const char16_t* value) {
6802 return xtd::convert::to_double(value);
6803 }
6804
6819 template<>
6820 inline double as<double>(char16_t* value) {
6821 return xtd::convert::to_double(value);
6822 }
6823
6838 template<>
6839 inline double as<double>(const char32_t* value) {
6840 return xtd::convert::to_double(value);
6841 }
6842
6857 template<>
6858 inline double as<double>(char32_t* value) {
6859 return xtd::convert::to_double(value);
6860 }
6861
6876 template<>
6877 inline double as<double>(const wchar_t* value) {
6878 return xtd::convert::to_double(value);
6879 }
6880
6895 template<>
6896 inline double as<double>(wchar_t* value) {
6897 return xtd::convert::to_double(value);
6898 }
6899
6914 template<>
6915 inline float as<float>(std::any value) {
6916 return xtd::convert::to_single(value);
6917 }
6918
6932 template<>
6933 inline float as<float>(bool value) {
6934 return xtd::convert::to_single(value);
6935 }
6936
6950 template<>
6951 inline float as<float>(byte_t value) {
6952 return xtd::convert::to_single(value);
6953 }
6954
6969 template<>
6970 inline float as<float>(char value) {
6971 return xtd::convert::to_single(value);
6972 }
6973
6988 template<>
6989 inline float as<float>(char8_t value) {
6990 return xtd::convert::to_single(value);
6991 }
6992
7007 template<>
7008 inline float as<float>(char16_t value) {
7009 return xtd::convert::to_single(value);
7010 }
7011
7026 template<>
7027 inline float as<float>(char32_t value) {
7028 return xtd::convert::to_single(value);
7029 }
7030
7045 template<>
7046 inline float as<float>(wchar_t value) {
7047 return xtd::convert::to_single(value);
7048 }
7049
7063 template<>
7064 inline float as<float>(decimal_t value) {
7065 return xtd::convert::to_single(value);
7066 }
7067
7081 template<>
7082 inline float as<float>(double value) {
7083 return xtd::convert::to_single(value);
7084 }
7085
7099 template<>
7100 inline float as<float>(float value) {
7101 return xtd::convert::to_single(value);
7102 }
7103
7117 template<>
7118 inline float as<float>(int16_t value) {
7119 return xtd::convert::to_single(value);
7120 }
7121
7135 template<>
7136 inline float as<float>(int32_t value) {
7137 return xtd::convert::to_single(value);
7138 }
7139
7153 template<>
7154 inline float as<float>(int64_t value) {
7155 return xtd::convert::to_single(value);
7156 }
7157
7171 template<>
7172 inline float as<float>(llong_t value) {
7173 return xtd::convert::to_single(value);
7174 }
7175
7189 template<>
7190 inline float as<float>(sbyte_t value) {
7191 return xtd::convert::to_single(value);
7192 }
7193
7207 template<>
7208 inline float as<float>(uint16_t value) {
7209 return xtd::convert::to_single(value);
7210 }
7211
7225 template<>
7226 inline float as<float>(uint32_t value) {
7227 return xtd::convert::to_single(value);
7228 }
7229
7243 template<>
7244 inline float as<float>(uint64_t value) {
7245 return xtd::convert::to_single(value);
7246 }
7247
7261 template<>
7262 inline float as<float>(ullong_t value) {
7263 return xtd::convert::to_single(value);
7264 }
7265
7280 template<>
7281 inline float as<float>(const xtd::ustring& value) {
7282 return xtd::convert::to_single(value);
7283 }
7284
7299 template<>
7300 inline float as<float>(const std::string& value) {
7301 return xtd::convert::to_single(value);
7302 }
7303
7318 template<>
7319 inline float as<float>(const std::u8string& value) {
7320 return xtd::convert::to_single(value);
7321 }
7322
7337 template<>
7338 inline float as<float>(const std::u16string& value) {
7339 return xtd::convert::to_single(value);
7340 }
7341
7356 template<>
7357 inline float as<float>(const std::u32string& value) {
7358 return xtd::convert::to_single(value);
7359 }
7360
7375 template<>
7376 inline float as<float>(const std::wstring& value) {
7377 return xtd::convert::to_single(value);
7378 }
7379
7394 template<>
7395 inline float as<float>(const char* value) {
7396 return xtd::convert::to_single(value);
7397 }
7398
7413 template<>
7414 inline float as<float>(char* value) {
7415 return xtd::convert::to_single(value);
7416 }
7417
7432 template<>
7433 inline float as<float>(const char8_t* value) {
7434 return xtd::convert::to_single(value);
7435 }
7436
7451 template<>
7452 inline float as<float>(char8_t* value) {
7453 return xtd::convert::to_single(value);
7454 }
7455
7470 template<>
7471 inline float as<float>(const char16_t* value) {
7472 return xtd::convert::to_single(value);
7473 }
7474
7489 template<>
7490 inline float as<float>(char16_t* value) {
7491 return xtd::convert::to_single(value);
7492 }
7493
7508 template<>
7509 inline float as<float>(const char32_t* value) {
7510 return xtd::convert::to_single(value);
7511 }
7512
7527 template<>
7528 inline float as<float>(char32_t* value) {
7529 return xtd::convert::to_single(value);
7530 }
7531
7546 template<>
7547 inline float as<float>(const wchar_t* value) {
7548 return xtd::convert::to_single(value);
7549 }
7550
7565 template<>
7566 inline float as<float>(wchar_t* value) {
7567 return xtd::convert::to_single(value);
7568 }
7569
7584 template<>
7585 inline int16_t as<int16_t>(std::any value) {
7586 return xtd::convert::to_int16(value);
7587 }
7588
7602 template<>
7603 inline int16_t as<int16_t>(bool value) {
7604 return xtd::convert::to_int16(value);
7605 }
7606
7620 template<>
7621 inline int16_t as<int16_t>(byte_t value) {
7622 return xtd::convert::to_int16(value);
7623 }
7624
7639 template<>
7640 inline int16_t as<int16_t>(char value) {
7641 return xtd::convert::to_int16(value);
7642 }
7643
7658 template<>
7659 inline int16_t as<int16_t>(char8_t value) {
7660 return xtd::convert::to_int16(value);
7661 }
7662
7677 template<>
7678 inline int16_t as<int16_t>(char16_t value) {
7679 return xtd::convert::to_int16(value);
7680 }
7681
7696 template<>
7697 inline int16_t as<int16_t>(char32_t value) {
7698 return xtd::convert::to_int16(value);
7699 }
7700
7715 template<>
7716 inline int16_t as<int16_t>(wchar_t value) {
7717 return xtd::convert::to_int16(value);
7718 }
7719
7733 template<>
7734 inline int16_t as<int16_t>(decimal_t value) {
7735 return xtd::convert::to_int16(value);
7736 }
7737
7751 template<>
7752 inline int16_t as<int16_t>(double value) {
7753 return xtd::convert::to_int16(value);
7754 }
7755
7769 template<>
7770 inline int16_t as<int16_t>(float value) {
7771 return xtd::convert::to_int16(value);
7772 }
7773
7787 template<>
7788 inline int16_t as<int16_t>(int16_t value) {
7789 return xtd::convert::to_int16(value);
7790 }
7791
7805 template<>
7806 inline int16_t as<int16_t>(int32_t value) {
7807 return xtd::convert::to_int16(value);
7808 }
7809
7823 template<>
7824 inline int16_t as<int16_t>(int64_t value) {
7825 return xtd::convert::to_int16(value);
7826 }
7827
7841 template<>
7842 inline int16_t as<int16_t>(llong_t value) {
7843 return xtd::convert::to_int16(value);
7844 }
7845
7859 template<>
7860 inline int16_t as<int16_t>(sbyte_t value) {
7861 return xtd::convert::to_int16(value);
7862 }
7863
7877 template<>
7878 inline int16_t as<int16_t>(uint16_t value) {
7879 return xtd::convert::to_int16(value);
7880 }
7881
7895 template<>
7896 inline int16_t as<int16_t>(uint32_t value) {
7897 return xtd::convert::to_int16(value);
7898 }
7899
7913 template<>
7914 inline int16_t as<int16_t>(uint64_t value) {
7915 return xtd::convert::to_int16(value);
7916 }
7917
7931 template<>
7932 inline int16_t as<int16_t>(ullong_t value) {
7933 return xtd::convert::to_int16(value);
7934 }
7935
7950 template<>
7951 inline int16_t as<int16_t>(const xtd::ustring& value) {
7952 return xtd::convert::to_int16(value);
7953 }
7954
7970 template<>
7971 inline int16_t as<int16_t>(const xtd::ustring& value, byte_t from_base) {
7972 return xtd::convert::to_int16(value, from_base);
7973 }
7974
7989 template<>
7990 inline int16_t as<int16_t>(const std::string& value) {
7991 return xtd::convert::to_int16(value);
7992 }
7993
8008 template<>
8009 inline int16_t as<int16_t>(const std::u8string& value) {
8010 return xtd::convert::to_int16(value);
8011 }
8012
8027 template<>
8028 inline int16_t as<int16_t>(const std::u16string& value) {
8029 return xtd::convert::to_int16(value);
8030 }
8031
8046 template<>
8047 inline int16_t as<int16_t>(const std::u32string& value) {
8048 return xtd::convert::to_int16(value);
8049 }
8050
8065 template<>
8066 inline int16_t as<int16_t>(const std::wstring& value) {
8067 return xtd::convert::to_int16(value);
8068 }
8069
8084 template<>
8085 inline int16_t as<int16_t>(const char* value) {
8086 return xtd::convert::to_int16(value);
8087 }
8088
8103 template<>
8104 inline int16_t as<int16_t>(char* value) {
8105 return xtd::convert::to_int16(value);
8106 }
8107
8122 template<>
8123 inline int16_t as<int16_t>(const char8_t* value) {
8124 return xtd::convert::to_int16(value);
8125 }
8126
8141 template<>
8142 inline int16_t as<int16_t>(char8_t* value) {
8143 return xtd::convert::to_int16(value);
8144 }
8145
8160 template<>
8161 inline int16_t as<int16_t>(const char16_t* value) {
8162 return xtd::convert::to_int16(value);
8163 }
8164
8179 template<>
8180 inline int16_t as<int16_t>(char16_t* value) {
8181 return xtd::convert::to_int16(value);
8182 }
8183
8198 template<>
8199 inline int16_t as<int16_t>(const char32_t* value) {
8200 return xtd::convert::to_int16(value);
8201 }
8202
8217 template<>
8218 inline int16_t as<int16_t>(char32_t* value) {
8219 return xtd::convert::to_int16(value);
8220 }
8221
8236 template<>
8237 inline int16_t as<int16_t>(const wchar_t* value) {
8238 return xtd::convert::to_int16(value);
8239 }
8240
8255 template<>
8256 inline int16_t as<int16_t>(wchar_t* value) {
8257 return xtd::convert::to_int16(value);
8258 }
8259
8274 template<>
8275 inline int32_t as<int32_t>(std::any value) {
8276 return xtd::convert::to_int32(value);
8277 }
8278
8292 template<>
8293 inline int32_t as<int32_t>(bool value) {
8294 return xtd::convert::to_int32(value);
8295 }
8296
8310 template<>
8311 inline int32_t as<int32_t>(byte_t value) {
8312 return xtd::convert::to_int32(value);
8313 }
8314
8329 template<>
8330 inline int32_t as<int32_t>(char value) {
8331 return xtd::convert::to_int32(value);
8332 }
8333
8348 template<>
8349 inline int32_t as<int32_t>(char8_t value) {
8350 return xtd::convert::to_int32(value);
8351 }
8352
8367 template<>
8368 inline int32_t as<int32_t>(char16_t value) {
8369 return xtd::convert::to_int32(value);
8370 }
8371
8386 template<>
8387 inline int32_t as<int32_t>(char32_t value) {
8388 return xtd::convert::to_int32(value);
8389 }
8390
8405 template<>
8406 inline int32_t as<int32_t>(wchar_t value) {
8407 return xtd::convert::to_int32(value);
8408 }
8409
8423 template<>
8424 inline int32_t as<int32_t>(decimal_t value) {
8425 return xtd::convert::to_int32(value);
8426 }
8427
8441 template<>
8442 inline int32_t as<int32_t>(double value) {
8443 return xtd::convert::to_int32(value);
8444 }
8445
8459 template<>
8460 inline int32_t as<int32_t>(float value) {
8461 return xtd::convert::to_int32(value);
8462 }
8463
8477 template<>
8478 inline int32_t as<int32_t>(int16_t value) {
8479 return xtd::convert::to_int32(value);
8480 }
8481
8495 template<>
8496 inline int32_t as<int32_t>(int32_t value) {
8497 return xtd::convert::to_int32(value);
8498 }
8499
8513 template<>
8514 inline int32_t as<int32_t>(int64_t value) {
8515 return xtd::convert::to_int32(value);
8516 }
8517
8531 template<>
8532 inline int32_t as<int32_t>(llong_t value) {
8533 return xtd::convert::to_int32(value);
8534 }
8535
8549 template<>
8550 inline int32_t as<int32_t>(sbyte_t value) {
8551 return xtd::convert::to_int32(value);
8552 }
8553
8567 template<>
8568 inline int32_t as<int32_t>(uint16_t value) {
8569 return xtd::convert::to_int32(value);
8570 }
8571
8585 template<>
8586 inline int32_t as<int32_t>(uint32_t value) {
8587 return xtd::convert::to_int32(value);
8588 }
8589
8603 template<>
8604 inline int32_t as<int32_t>(uint64_t value) {
8605 return xtd::convert::to_int32(value);
8606 }
8607
8621 template<>
8622 inline int32_t as<int32_t>(ullong_t value) {
8623 return xtd::convert::to_int32(value);
8624 }
8625
8640 template<>
8641 inline int32_t as<int32_t>(const xtd::ustring& value) {
8642 return xtd::convert::to_int32(value);
8643 }
8644
8660 template<>
8661 inline int32_t as<int32_t>(const xtd::ustring& value, byte_t from_base) {
8662 return xtd::convert::to_int32(value, from_base);
8663 }
8664
8679 template<>
8680 inline int32_t as<int32_t>(const std::string& value) {
8681 return xtd::convert::to_int32(value);
8682 }
8683
8698 template<>
8699 inline int32_t as<int32_t>(const std::u8string& value) {
8700 return xtd::convert::to_int32(value);
8701 }
8702
8717 template<>
8718 inline int32_t as<int32_t>(const std::u16string& value) {
8719 return xtd::convert::to_int32(value);
8720 }
8721
8736 template<>
8737 inline int32_t as<int32_t>(const std::u32string& value) {
8738 return xtd::convert::to_int32(value);
8739 }
8740
8755 template<>
8756 inline int32_t as<int32_t>(const std::wstring& value) {
8757 return xtd::convert::to_int32(value);
8758 }
8759
8774 template<>
8775 inline int32_t as<int32_t>(const char* value) {
8776 return xtd::convert::to_int32(value);
8777 }
8778
8793 template<>
8794 inline int32_t as<int32_t>(char* value) {
8795 return xtd::convert::to_int32(value);
8796 }
8797
8812 template<>
8813 inline int32_t as<int32_t>(const char8_t* value) {
8814 return xtd::convert::to_int32(value);
8815 }
8816
8831 template<>
8832 inline int32_t as<int32_t>(char8_t* value) {
8833 return xtd::convert::to_int32(value);
8834 }
8835
8850 template<>
8851 inline int32_t as<int32_t>(const char16_t* value) {
8852 return xtd::convert::to_int32(value);
8853 }
8854
8869 template<>
8870 inline int32_t as<int32_t>(char16_t* value) {
8871 return xtd::convert::to_int32(value);
8872 }
8873
8888 template<>
8889 inline int32_t as<int32_t>(const char32_t* value) {
8890 return xtd::convert::to_int32(value);
8891 }
8892
8907 template<>
8908 inline int32_t as<int32_t>(char32_t* value) {
8909 return xtd::convert::to_int32(value);
8910 }
8911
8926 template<>
8927 inline int32_t as<int32_t>(const wchar_t* value) {
8928 return xtd::convert::to_int32(value);
8929 }
8930
8945 template<>
8946 inline int32_t as<int32_t>(wchar_t* value) {
8947 return xtd::convert::to_int32(value);
8948 }
8949
8964 template<>
8965 inline int64_t as<int64_t>(std::any value) {
8966 return xtd::convert::to_int64(value);
8967 }
8968
8982 template<>
8983 inline int64_t as<int64_t>(bool value) {
8984 return xtd::convert::to_int64(value);
8985 }
8986
9000 template<>
9001 inline int64_t as<int64_t>(byte_t value) {
9002 return xtd::convert::to_int64(value);
9003 }
9004
9019 template<>
9020 inline int64_t as<int64_t>(char value) {
9021 return xtd::convert::to_int64(value);
9022 }
9023
9038 template<>
9039 inline int64_t as<int64_t>(char8_t value) {
9040 return xtd::convert::to_int64(value);
9041 }
9042
9057 template<>
9058 inline int64_t as<int64_t>(char16_t value) {
9059 return xtd::convert::to_int64(value);
9060 }
9061
9076 template<>
9077 inline int64_t as<int64_t>(char32_t value) {
9078 return xtd::convert::to_int64(value);
9079 }
9080
9095 template<>
9096 inline int64_t as<int64_t>(wchar_t value) {
9097 return xtd::convert::to_int64(value);
9098 }
9099
9113 template<>
9114 inline int64_t as<int64_t>(decimal_t value) {
9115 return xtd::convert::to_int64(value);
9116 }
9117
9131 template<>
9132 inline int64_t as<int64_t>(double value) {
9133 return xtd::convert::to_int64(value);
9134 }
9135
9149 template<>
9150 inline int64_t as<int64_t>(float value) {
9151 return xtd::convert::to_int64(value);
9152 }
9153
9167 template<>
9168 inline int64_t as<int64_t>(int16_t value) {
9169 return xtd::convert::to_int64(value);
9170 }
9171
9185 template<>
9186 inline int64_t as<int64_t>(int32_t value) {
9187 return xtd::convert::to_int64(value);
9188 }
9189
9203 template<>
9204 inline int64_t as<int64_t>(int64_t value) {
9205 return xtd::convert::to_int64(value);
9206 }
9207
9221 template<>
9222 inline int64_t as<int64_t>(llong_t value) {
9223 return xtd::convert::to_int64(value);
9224 }
9225
9239 template<>
9240 inline int64_t as<int64_t>(sbyte_t value) {
9241 return xtd::convert::to_int64(value);
9242 }
9243
9257 template<>
9258 inline int64_t as<int64_t>(uint16_t value) {
9259 return xtd::convert::to_int64(value);
9260 }
9261
9275 template<>
9276 inline int64_t as<int64_t>(uint32_t value) {
9277 return xtd::convert::to_int64(value);
9278 }
9279
9293 template<>
9294 inline int64_t as<int64_t>(uint64_t value) {
9295 return xtd::convert::to_int64(value);
9296 }
9297
9311 template<>
9312 inline int64_t as<int64_t>(ullong_t value) {
9313 return xtd::convert::to_int64(value);
9314 }
9315
9330 template<>
9331 inline int64_t as<int64_t>(const xtd::ustring& value) {
9332 return xtd::convert::to_int64(value);
9333 }
9334
9350 template<>
9351 inline int64_t as<int64_t>(const xtd::ustring& value, byte_t from_base) {
9352 return xtd::convert::to_int64(value, from_base);
9353 }
9354
9369 template<>
9370 inline int64_t as<int64_t>(const std::string& value) {
9371 return xtd::convert::to_int64(value);
9372 }
9373
9388 template<>
9389 inline int64_t as<int64_t>(const std::u8string& value) {
9390 return xtd::convert::to_int64(value);
9391 }
9392
9407 template<>
9408 inline int64_t as<int64_t>(const std::u16string& value) {
9409 return xtd::convert::to_int64(value);
9410 }
9411
9426 template<>
9427 inline int64_t as<int64_t>(const std::u32string& value) {
9428 return xtd::convert::to_int64(value);
9429 }
9430
9445 template<>
9446 inline int64_t as<int64_t>(const std::wstring& value) {
9447 return xtd::convert::to_int64(value);
9448 }
9449
9464 template<>
9465 inline int64_t as<int64_t>(const char* value) {
9466 return xtd::convert::to_int64(value);
9467 }
9468
9483 template<>
9484 inline int64_t as<int64_t>(char* value) {
9485 return xtd::convert::to_int64(value);
9486 }
9487
9502 template<>
9503 inline int64_t as<int64_t>(const char8_t* value) {
9504 return xtd::convert::to_int64(value);
9505 }
9506
9521 template<>
9522 inline int64_t as<int64_t>(char8_t* value) {
9523 return xtd::convert::to_int64(value);
9524 }
9525
9540 template<>
9541 inline int64_t as<int64_t>(const char16_t* value) {
9542 return xtd::convert::to_int64(value);
9543 }
9544
9559 template<>
9560 inline int64_t as<int64_t>(char16_t* value) {
9561 return xtd::convert::to_int64(value);
9562 }
9563
9578 template<>
9579 inline int64_t as<int64_t>(const char32_t* value) {
9580 return xtd::convert::to_int64(value);
9581 }
9582
9597 template<>
9598 inline int64_t as<int64_t>(char32_t* value) {
9599 return xtd::convert::to_int64(value);
9600 }
9601
9616 template<>
9617 inline int64_t as<int64_t>(const wchar_t* value) {
9618 return xtd::convert::to_int64(value);
9619 }
9620
9635 template<>
9636 inline int64_t as<int64_t>(wchar_t* value) {
9637 return xtd::convert::to_int64(value);
9638 }
9639
9654 template<>
9655 inline llong_t as<llong_t>(std::any value) {
9656 return xtd::convert::to_llong(value);
9657 }
9658
9672 template<>
9673 inline llong_t as<llong_t>(bool value) {
9674 return xtd::convert::to_llong(value);
9675 }
9676
9690 template<>
9691 inline llong_t as<llong_t>(byte_t value) {
9692 return xtd::convert::to_llong(value);
9693 }
9694
9709 template<>
9710 inline llong_t as<llong_t>(char value) {
9711 return xtd::convert::to_llong(value);
9712 }
9713
9728 template<>
9729 inline llong_t as<llong_t>(char8_t value) {
9730 return xtd::convert::to_llong(value);
9731 }
9732
9747 template<>
9748 inline llong_t as<llong_t>(char16_t value) {
9749 return xtd::convert::to_llong(value);
9750 }
9751
9766 template<>
9767 inline llong_t as<llong_t>(char32_t value) {
9768 return xtd::convert::to_llong(value);
9769 }
9770
9785 template<>
9786 inline llong_t as<llong_t>(wchar_t value) {
9787 return xtd::convert::to_llong(value);
9788 }
9789
9803 template<>
9804 inline llong_t as<llong_t>(decimal_t value) {
9805 return xtd::convert::to_llong(value);
9806 }
9807
9821 template<>
9822 inline llong_t as<llong_t>(double value) {
9823 return xtd::convert::to_llong(value);
9824 }
9825
9839 template<>
9840 inline llong_t as<llong_t>(float value) {
9841 return xtd::convert::to_llong(value);
9842 }
9843
9857 template<>
9858 inline llong_t as<llong_t>(int16_t value) {
9859 return xtd::convert::to_llong(value);
9860 }
9861
9875 template<>
9876 inline llong_t as<llong_t>(int32_t value) {
9877 return xtd::convert::to_llong(value);
9878 }
9879
9893 template<>
9894 inline llong_t as<llong_t>(int64_t value) {
9895 return xtd::convert::to_llong(value);
9896 }
9897
9911 template<>
9912 inline llong_t as<llong_t>(llong_t value) {
9913 return xtd::convert::to_llong(value);
9914 }
9915
9929 template<>
9930 inline llong_t as<llong_t>(sbyte_t value) {
9931 return xtd::convert::to_llong(value);
9932 }
9933
9947 template<>
9948 inline llong_t as<llong_t>(uint16_t value) {
9949 return xtd::convert::to_llong(value);
9950 }
9951
9965 template<>
9966 inline llong_t as<llong_t>(uint32_t value) {
9967 return xtd::convert::to_llong(value);
9968 }
9969
9983 template<>
9984 inline llong_t as<llong_t>(uint64_t value) {
9985 return xtd::convert::to_llong(value);
9986 }
9987
10001 template<>
10002 inline llong_t as<llong_t>(ullong_t value) {
10003 return xtd::convert::to_llong(value);
10004 }
10005
10020 template<>
10021 inline llong_t as<llong_t>(const xtd::ustring& value) {
10022 return xtd::convert::to_llong(value);
10023 }
10024
10040 template<>
10041 inline llong_t as<llong_t>(const xtd::ustring& value, byte_t from_base) {
10042 return xtd::convert::to_llong(value, from_base);
10043 }
10044
10059 template<>
10060 inline llong_t as<llong_t>(const std::string& value) {
10061 return xtd::convert::to_llong(value);
10062 }
10063
10078 template<>
10079 inline llong_t as<llong_t>(const std::u8string& value) {
10080 return xtd::convert::to_llong(value);
10081 }
10082
10097 template<>
10098 inline llong_t as<llong_t>(const std::u16string& value) {
10099 return xtd::convert::to_llong(value);
10100 }
10101
10116 template<>
10117 inline llong_t as<llong_t>(const std::u32string& value) {
10118 return xtd::convert::to_llong(value);
10119 }
10120
10135 template<>
10136 inline llong_t as<llong_t>(const std::wstring& value) {
10137 return xtd::convert::to_llong(value);
10138 }
10139
10154 template<>
10155 inline llong_t as<llong_t>(const char* value) {
10156 return xtd::convert::to_llong(value);
10157 }
10158
10173 template<>
10174 inline llong_t as<llong_t>(char* value) {
10175 return xtd::convert::to_llong(value);
10176 }
10177
10192 template<>
10193 inline llong_t as<llong_t>(const char8_t* value) {
10194 return xtd::convert::to_llong(value);
10195 }
10196
10211 template<>
10212 inline llong_t as<llong_t>(char8_t* value) {
10213 return xtd::convert::to_llong(value);
10214 }
10215
10230 template<>
10231 inline llong_t as<llong_t>(const char16_t* value) {
10232 return xtd::convert::to_llong(value);
10233 }
10234
10249 template<>
10250 inline llong_t as<llong_t>(char16_t* value) {
10251 return xtd::convert::to_llong(value);
10252 }
10253
10268 template<>
10269 inline llong_t as<llong_t>(const char32_t* value) {
10270 return xtd::convert::to_llong(value);
10271 }
10272
10287 template<>
10288 inline llong_t as<llong_t>(char32_t* value) {
10289 return xtd::convert::to_llong(value);
10290 }
10291
10306 template<>
10307 inline llong_t as<llong_t>(const wchar_t* value) {
10308 return xtd::convert::to_llong(value);
10309 }
10310
10325 template<>
10326 inline llong_t as<llong_t>(wchar_t* value) {
10327 return xtd::convert::to_llong(value);
10328 }
10329
10344 template<>
10345 inline sbyte_t as<sbyte_t>(std::any value) {
10346 return xtd::convert::to_sbyte(value);
10347 }
10348
10362 template<>
10363 inline sbyte_t as<sbyte_t>(bool value) {
10364 return xtd::convert::to_sbyte(value);
10365 }
10366
10380 template<>
10381 inline sbyte_t as<sbyte_t>(byte_t value) {
10382 return xtd::convert::to_sbyte(value);
10383 }
10384
10399 template<>
10400 inline sbyte_t as<sbyte_t>(char value) {
10401 return xtd::convert::to_sbyte(value);
10402 }
10403
10418 template<>
10419 inline sbyte_t as<sbyte_t>(char8_t value) {
10420 return xtd::convert::to_sbyte(value);
10421 }
10422
10437 template<>
10438 inline sbyte_t as<sbyte_t>(char16_t value) {
10439 return xtd::convert::to_sbyte(value);
10440 }
10441
10456 template<>
10457 inline sbyte_t as<sbyte_t>(char32_t value) {
10458 return xtd::convert::to_sbyte(value);
10459 }
10460
10475 template<>
10476 inline sbyte_t as<sbyte_t>(wchar_t value) {
10477 return xtd::convert::to_sbyte(value);
10478 }
10479
10493 template<>
10494 inline sbyte_t as<sbyte_t>(decimal_t value) {
10495 return xtd::convert::to_sbyte(value);
10496 }
10497
10511 template<>
10512 inline sbyte_t as<sbyte_t>(double value) {
10513 return xtd::convert::to_sbyte(value);
10514 }
10515
10529 template<>
10530 inline sbyte_t as<sbyte_t>(float value) {
10531 return xtd::convert::to_sbyte(value);
10532 }
10533
10547 template<>
10548 inline sbyte_t as<sbyte_t>(int16_t value) {
10549 return xtd::convert::to_sbyte(value);
10550 }
10551
10565 template<>
10566 inline sbyte_t as<sbyte_t>(int32_t value) {
10567 return xtd::convert::to_sbyte(value);
10568 }
10569
10583 template<>
10584 inline sbyte_t as<sbyte_t>(int64_t value) {
10585 return xtd::convert::to_sbyte(value);
10586 }
10587
10601 template<>
10602 inline sbyte_t as<sbyte_t>(llong_t value) {
10603 return xtd::convert::to_sbyte(value);
10604 }
10605
10619 template<>
10620 inline sbyte_t as<sbyte_t>(sbyte_t value) {
10621 return xtd::convert::to_sbyte(value);
10622 }
10623
10637 template<>
10638 inline sbyte_t as<sbyte_t>(uint16_t value) {
10639 return xtd::convert::to_sbyte(value);
10640 }
10641
10655 template<>
10656 inline sbyte_t as<sbyte_t>(uint32_t value) {
10657 return xtd::convert::to_sbyte(value);
10658 }
10659
10673 template<>
10674 inline sbyte_t as<sbyte_t>(uint64_t value) {
10675 return xtd::convert::to_sbyte(value);
10676 }
10677
10691 template<>
10692 inline sbyte_t as<sbyte_t>(ullong_t value) {
10693 return xtd::convert::to_sbyte(value);
10694 }
10695
10710 template<>
10711 inline sbyte_t as<sbyte_t>(const xtd::ustring& value) {
10712 return xtd::convert::to_sbyte(value);
10713 }
10714
10730 template<>
10731 inline sbyte_t as<sbyte_t>(const xtd::ustring& value, byte_t from_base) {
10732 return xtd::convert::to_sbyte(value, from_base);
10733 }
10734
10749 template<>
10750 inline sbyte_t as<sbyte_t>(const std::string& value) {
10751 return xtd::convert::to_sbyte(value);
10752 }
10753
10768 template<>
10769 inline sbyte_t as<sbyte_t>(const std::u8string& value) {
10770 return xtd::convert::to_sbyte(value);
10771 }
10772
10787 template<>
10788 inline sbyte_t as<sbyte_t>(const std::u16string& value) {
10789 return xtd::convert::to_sbyte(value);
10790 }
10791
10806 template<>
10807 inline sbyte_t as<sbyte_t>(const std::u32string& value) {
10808 return xtd::convert::to_sbyte(value);
10809 }
10810
10825 template<>
10826 inline sbyte_t as<sbyte_t>(const std::wstring& value) {
10827 return xtd::convert::to_sbyte(value);
10828 }
10829
10844 template<>
10845 inline sbyte_t as<sbyte_t>(const char* value) {
10846 return xtd::convert::to_sbyte(value);
10847 }
10848
10863 template<>
10864 inline sbyte_t as<sbyte_t>(char* value) {
10865 return xtd::convert::to_sbyte(value);
10866 }
10867
10882 template<>
10883 inline sbyte_t as<sbyte_t>(const char8_t* value) {
10884 return xtd::convert::to_sbyte(value);
10885 }
10886
10901 template<>
10902 inline sbyte_t as<sbyte_t>(char8_t* value) {
10903 return xtd::convert::to_sbyte(value);
10904 }
10905
10920 template<>
10921 inline sbyte_t as<sbyte_t>(const char16_t* value) {
10922 return xtd::convert::to_sbyte(value);
10923 }
10924
10939 template<>
10940 inline sbyte_t as<sbyte_t>(char16_t* value) {
10941 return xtd::convert::to_sbyte(value);
10942 }
10943
10958 template<>
10959 inline sbyte_t as<sbyte_t>(const char32_t* value) {
10960 return xtd::convert::to_sbyte(value);
10961 }
10962
10977 template<>
10978 inline sbyte_t as<sbyte_t>(char32_t* value) {
10979 return xtd::convert::to_sbyte(value);
10980 }
10981
10996 template<>
10997 inline sbyte_t as<sbyte_t>(const wchar_t* value) {
10998 return xtd::convert::to_sbyte(value);
10999 }
11000
11015 template<>
11016 inline sbyte_t as<sbyte_t>(wchar_t* value) {
11017 return xtd::convert::to_sbyte(value);
11018 }
11019
11034 template<>
11035 inline uint16_t as<uint16_t>(std::any value) {
11036 return xtd::convert::to_uint16(value);
11037 }
11038
11052 template<>
11053 inline uint16_t as<uint16_t>(bool value) {
11054 return xtd::convert::to_uint16(value);
11055 }
11056
11070 template<>
11071 inline uint16_t as<uint16_t>(byte_t value) {
11072 return xtd::convert::to_uint16(value);
11073 }
11074
11089 template<>
11090 inline uint16_t as<uint16_t>(char value) {
11091 return xtd::convert::to_uint16(value);
11092 }
11093
11108 template<>
11109 inline uint16_t as<uint16_t>(char8_t value) {
11110 return xtd::convert::to_uint16(value);
11111 }
11112
11127 template<>
11128 inline uint16_t as<uint16_t>(char16_t value) {
11129 return xtd::convert::to_uint16(value);
11130 }
11131
11146 template<>
11147 inline uint16_t as<uint16_t>(char32_t value) {
11148 return xtd::convert::to_uint16(value);
11149 }
11150
11165 template<>
11166 inline uint16_t as<uint16_t>(wchar_t value) {
11167 return xtd::convert::to_uint16(value);
11168 }
11169
11183 template<>
11184 inline uint16_t as<uint16_t>(decimal_t value) {
11185 return xtd::convert::to_uint16(value);
11186 }
11187
11201 template<>
11202 inline uint16_t as<uint16_t>(double value) {
11203 return xtd::convert::to_uint16(value);
11204 }
11205
11219 template<>
11220 inline uint16_t as<uint16_t>(float value) {
11221 return xtd::convert::to_uint16(value);
11222 }
11223
11237 template<>
11238 inline uint16_t as<uint16_t>(int16_t value) {
11239 return xtd::convert::to_uint16(value);
11240 }
11241
11255 template<>
11256 inline uint16_t as<uint16_t>(int32_t value) {
11257 return xtd::convert::to_uint16(value);
11258 }
11259
11273 template<>
11274 inline uint16_t as<uint16_t>(int64_t value) {
11275 return xtd::convert::to_uint16(value);
11276 }
11277
11291 template<>
11292 inline uint16_t as<uint16_t>(llong_t value) {
11293 return xtd::convert::to_uint16(value);
11294 }
11295
11309 template<>
11310 inline uint16_t as<uint16_t>(sbyte_t value) {
11311 return xtd::convert::to_uint16(value);
11312 }
11313
11327 template<>
11328 inline uint16_t as<uint16_t>(uint16_t value) {
11329 return xtd::convert::to_uint16(value);
11330 }
11331
11345 template<>
11346 inline uint16_t as<uint16_t>(uint32_t value) {
11347 return xtd::convert::to_uint16(value);
11348 }
11349
11363 template<>
11364 inline uint16_t as<uint16_t>(uint64_t value) {
11365 return xtd::convert::to_uint16(value);
11366 }
11367
11381 template<>
11382 inline uint16_t as<uint16_t>(ullong_t value) {
11383 return xtd::convert::to_uint16(value);
11384 }
11385
11400 template<>
11401 inline uint16_t as<uint16_t>(const xtd::ustring& value) {
11402 return xtd::convert::to_uint16(value);
11403 }
11404
11420 template<>
11421 inline uint16_t as<uint16_t>(const xtd::ustring& value, byte_t from_base) {
11422 return xtd::convert::to_uint16(value, from_base);
11423 }
11424
11439 template<>
11440 inline uint16_t as<uint16_t>(const std::string& value) {
11441 return xtd::convert::to_uint16(value);
11442 }
11443
11458 template<>
11459 inline uint16_t as<uint16_t>(const std::u8string& value) {
11460 return xtd::convert::to_uint16(value);
11461 }
11462
11477 template<>
11478 inline uint16_t as<uint16_t>(const std::u16string& value) {
11479 return xtd::convert::to_uint16(value);
11480 }
11481
11496 template<>
11497 inline uint16_t as<uint16_t>(const std::u32string& value) {
11498 return xtd::convert::to_uint16(value);
11499 }
11500
11515 template<>
11516 inline uint16_t as<uint16_t>(const std::wstring& value) {
11517 return xtd::convert::to_uint16(value);
11518 }
11519
11534 template<>
11535 inline uint16_t as<uint16_t>(const char* value) {
11536 return xtd::convert::to_uint16(value);
11537 }
11538
11553 template<>
11554 inline uint16_t as<uint16_t>(char* value) {
11555 return xtd::convert::to_uint16(value);
11556 }
11557
11572 template<>
11573 inline uint16_t as<uint16_t>(const char8_t* value) {
11574 return xtd::convert::to_uint16(value);
11575 }
11576
11591 template<>
11592 inline uint16_t as<uint16_t>(char8_t* value) {
11593 return xtd::convert::to_uint16(value);
11594 }
11595
11610 template<>
11611 inline uint16_t as<uint16_t>(const char16_t* value) {
11612 return xtd::convert::to_uint16(value);
11613 }
11614
11629 template<>
11630 inline uint16_t as<uint16_t>(char16_t* value) {
11631 return xtd::convert::to_uint16(value);
11632 }
11633
11648 template<>
11649 inline uint16_t as<uint16_t>(const char32_t* value) {
11650 return xtd::convert::to_uint16(value);
11651 }
11652
11667 template<>
11668 inline uint16_t as<uint16_t>(char32_t* value) {
11669 return xtd::convert::to_uint16(value);
11670 }
11671
11686 template<>
11687 inline uint16_t as<uint16_t>(const wchar_t* value) {
11688 return xtd::convert::to_uint16(value);
11689 }
11690
11705 template<>
11706 inline uint16_t as<uint16_t>(wchar_t* value) {
11707 return xtd::convert::to_uint16(value);
11708 }
11709
11724 template<>
11725 inline uint32_t as<uint32_t>(std::any value) {
11726 return xtd::convert::to_uint32(value);
11727 }
11728
11742 template<>
11743 inline uint32_t as<uint32_t>(bool value) {
11744 return xtd::convert::to_uint32(value);
11745 }
11746
11760 template<>
11761 inline uint32_t as<uint32_t>(byte_t value) {
11762 return xtd::convert::to_uint32(value);
11763 }
11764
11779 template<>
11780 inline uint32_t as<uint32_t>(char value) {
11781 return xtd::convert::to_uint32(value);
11782 }
11783
11798 template<>
11799 inline uint32_t as<uint32_t>(char8_t value) {
11800 return xtd::convert::to_uint32(value);
11801 }
11802
11817 template<>
11818 inline uint32_t as<uint32_t>(char16_t value) {
11819 return xtd::convert::to_uint32(value);
11820 }
11821
11836 template<>
11837 inline uint32_t as<uint32_t>(char32_t value) {
11838 return xtd::convert::to_uint32(value);
11839 }
11840
11855 template<>
11856 inline uint32_t as<uint32_t>(wchar_t value) {
11857 return xtd::convert::to_uint32(value);
11858 }
11859
11873 template<>
11874 inline uint32_t as<uint32_t>(decimal_t value) {
11875 return xtd::convert::to_uint32(value);
11876 }
11877
11891 template<>
11892 inline uint32_t as<uint32_t>(double value) {
11893 return xtd::convert::to_uint32(value);
11894 }
11895
11909 template<>
11910 inline uint32_t as<uint32_t>(float value) {
11911 return xtd::convert::to_uint32(value);
11912 }
11913
11927 template<>
11928 inline uint32_t as<uint32_t>(int16_t value) {
11929 return xtd::convert::to_uint32(value);
11930 }
11931
11945 template<>
11946 inline uint32_t as<uint32_t>(int32_t value) {
11947 return xtd::convert::to_uint32(value);
11948 }
11949
11963 template<>
11964 inline uint32_t as<uint32_t>(int64_t value) {
11965 return xtd::convert::to_uint32(value);
11966 }
11967
11981 template<>
11982 inline uint32_t as<uint32_t>(llong_t value) {
11983 return xtd::convert::to_uint32(value);
11984 }
11985
11999 template<>
12000 inline uint32_t as<uint32_t>(sbyte_t value) {
12001 return xtd::convert::to_uint32(value);
12002 }
12003
12017 template<>
12018 inline uint32_t as<uint32_t>(uint16_t value) {
12019 return xtd::convert::to_uint32(value);
12020 }
12021
12035 template<>
12036 inline uint32_t as<uint32_t>(uint32_t value) {
12037 return xtd::convert::to_uint32(value);
12038 }
12039
12053 template<>
12054 inline uint32_t as<uint32_t>(uint64_t value) {
12055 return xtd::convert::to_uint32(value);
12056 }
12057
12071 template<>
12072 inline uint32_t as<uint32_t>(ullong_t value) {
12073 return xtd::convert::to_uint32(value);
12074 }
12075
12090 template<>
12091 inline uint32_t as<uint32_t>(const xtd::ustring& value) {
12092 return xtd::convert::to_uint32(value);
12093 }
12094
12110 template<>
12111 inline uint32_t as<uint32_t>(const xtd::ustring& value, byte_t from_base) {
12112 return xtd::convert::to_uint32(value, from_base);
12113 }
12114
12129 template<>
12130 inline uint32_t as<uint32_t>(const std::string& value) {
12131 return xtd::convert::to_uint32(value);
12132 }
12133
12148 template<>
12149 inline uint32_t as<uint32_t>(const std::u8string& value) {
12150 return xtd::convert::to_uint32(value);
12151 }
12152
12167 template<>
12168 inline uint32_t as<uint32_t>(const std::u16string& value) {
12169 return xtd::convert::to_uint32(value);
12170 }
12171
12186 template<>
12187 inline uint32_t as<uint32_t>(const std::u32string& value) {
12188 return xtd::convert::to_uint32(value);
12189 }
12190
12205 template<>
12206 inline uint32_t as<uint32_t>(const std::wstring& value) {
12207 return xtd::convert::to_uint32(value);
12208 }
12209
12224 template<>
12225 inline uint32_t as<uint32_t>(const char* value) {
12226 return xtd::convert::to_uint32(value);
12227 }
12228
12243 template<>
12244 inline uint32_t as<uint32_t>(char* value) {
12245 return xtd::convert::to_uint32(value);
12246 }
12247
12262 template<>
12263 inline uint32_t as<uint32_t>(const char8_t* value) {
12264 return xtd::convert::to_uint32(value);
12265 }
12266
12281 template<>
12282 inline uint32_t as<uint32_t>(char8_t* value) {
12283 return xtd::convert::to_uint32(value);
12284 }
12285
12300 template<>
12301 inline uint32_t as<uint32_t>(const char16_t* value) {
12302 return xtd::convert::to_uint32(value);
12303 }
12304
12319 template<>
12320 inline uint32_t as<uint32_t>(char16_t* value) {
12321 return xtd::convert::to_uint32(value);
12322 }
12323
12338 template<>
12339 inline uint32_t as<uint32_t>(const char32_t* value) {
12340 return xtd::convert::to_uint32(value);
12341 }
12342
12357 template<>
12358 inline uint32_t as<uint32_t>(char32_t* value) {
12359 return xtd::convert::to_uint32(value);
12360 }
12361
12376 template<>
12377 inline uint32_t as<uint32_t>(const wchar_t* value) {
12378 return xtd::convert::to_uint32(value);
12379 }
12380
12395 template<>
12396 inline uint32_t as<uint32_t>(wchar_t* value) {
12397 return xtd::convert::to_uint32(value);
12398 }
12399
12414 template<>
12415 inline uint64_t as<uint64_t>(std::any value) {
12416 return xtd::convert::to_uint64(value);
12417 }
12418
12432 template<>
12433 inline uint64_t as<uint64_t>(bool value) {
12434 return xtd::convert::to_uint64(value);
12435 }
12436
12450 template<>
12451 inline uint64_t as<uint64_t>(byte_t value) {
12452 return xtd::convert::to_uint64(value);
12453 }
12454
12469 template<>
12470 inline uint64_t as<uint64_t>(char value) {
12471 return xtd::convert::to_uint64(value);
12472 }
12473
12488 template<>
12489 inline uint64_t as<uint64_t>(char8_t value) {
12490 return xtd::convert::to_uint64(value);
12491 }
12492
12507 template<>
12508 inline uint64_t as<uint64_t>(char16_t value) {
12509 return xtd::convert::to_uint64(value);
12510 }
12511
12526 template<>
12527 inline uint64_t as<uint64_t>(char32_t value) {
12528 return xtd::convert::to_uint64(value);
12529 }
12530
12545 template<>
12546 inline uint64_t as<uint64_t>(wchar_t value) {
12547 return xtd::convert::to_uint64(value);
12548 }
12549
12563 template<>
12564 inline uint64_t as<uint64_t>(decimal_t value) {
12565 return xtd::convert::to_uint64(value);
12566 }
12567
12581 template<>
12582 inline uint64_t as<uint64_t>(double value) {
12583 return xtd::convert::to_uint64(value);
12584 }
12585
12599 template<>
12600 inline uint64_t as<uint64_t>(float value) {
12601 return xtd::convert::to_uint64(value);
12602 }
12603
12617 template<>
12618 inline uint64_t as<uint64_t>(int16_t value) {
12619 return xtd::convert::to_uint64(value);
12620 }
12621
12635 template<>
12636 inline uint64_t as<uint64_t>(int32_t value) {
12637 return xtd::convert::to_uint64(value);
12638 }
12639
12653 template<>
12654 inline uint64_t as<uint64_t>(int64_t value) {
12655 return xtd::convert::to_uint64(value);
12656 }
12657
12671 template<>
12672 inline uint64_t as<uint64_t>(llong_t value) {
12673 return xtd::convert::to_uint64(value);
12674 }
12675
12689 template<>
12690 inline uint64_t as<uint64_t>(sbyte_t value) {
12691 return xtd::convert::to_uint64(value);
12692 }
12693
12707 template<>
12708 inline uint64_t as<uint64_t>(uint16_t value) {
12709 return xtd::convert::to_uint64(value);
12710 }
12711
12725 template<>
12726 inline uint64_t as<uint64_t>(uint32_t value) {
12727 return xtd::convert::to_uint64(value);
12728 }
12729
12743 template<>
12744 inline uint64_t as<uint64_t>(uint64_t value) {
12745 return xtd::convert::to_uint64(value);
12746 }
12747
12761 template<>
12762 inline uint64_t as<uint64_t>(ullong_t value) {
12763 return xtd::convert::to_uint64(value);
12764 }
12765
12780 template<>
12781 inline uint64_t as<uint64_t>(const xtd::ustring& value) {
12782 return xtd::convert::to_uint64(value);
12783 }
12784
12800 template<>
12801 inline uint64_t as<uint64_t>(const xtd::ustring& value, byte_t from_base) {
12802 return xtd::convert::to_uint64(value, from_base);
12803 }
12804
12819 template<>
12820 inline uint64_t as<uint64_t>(const std::string& value) {
12821 return xtd::convert::to_uint64(value);
12822 }
12823
12838 template<>
12839 inline uint64_t as<uint64_t>(const std::u8string& value) {
12840 return xtd::convert::to_uint64(value);
12841 }
12842
12857 template<>
12858 inline uint64_t as<uint64_t>(const std::u16string& value) {
12859 return xtd::convert::to_uint64(value);
12860 }
12861
12876 template<>
12877 inline uint64_t as<uint64_t>(const std::u32string& value) {
12878 return xtd::convert::to_uint64(value);
12879 }
12880
12895 template<>
12896 inline uint64_t as<uint64_t>(const std::wstring& value) {
12897 return xtd::convert::to_uint64(value);
12898 }
12899
12914 template<>
12915 inline uint64_t as<uint64_t>(const char* value) {
12916 return xtd::convert::to_uint64(value);
12917 }
12918
12933 template<>
12934 inline uint64_t as<uint64_t>(char* value) {
12935 return xtd::convert::to_uint64(value);
12936 }
12937
12952 template<>
12953 inline uint64_t as<uint64_t>(const char8_t* value) {
12954 return xtd::convert::to_uint64(value);
12955 }
12956
12971 template<>
12972 inline uint64_t as<uint64_t>(char8_t* value) {
12973 return xtd::convert::to_uint64(value);
12974 }
12975
12990 template<>
12991 inline uint64_t as<uint64_t>(const char16_t* value) {
12992 return xtd::convert::to_uint64(value);
12993 }
12994
13009 template<>
13010 inline uint64_t as<uint64_t>(char16_t* value) {
13011 return xtd::convert::to_uint64(value);
13012 }
13013
13028 template<>
13029 inline uint64_t as<uint64_t>(const char32_t* value) {
13030 return xtd::convert::to_uint64(value);
13031 }
13032
13047 template<>
13048 inline uint64_t as<uint64_t>(char32_t* value) {
13049 return xtd::convert::to_uint64(value);
13050 }
13051
13066 template<>
13067 inline uint64_t as<uint64_t>(const wchar_t* value) {
13068 return xtd::convert::to_uint64(value);
13069 }
13070
13085 template<>
13086 inline uint64_t as<uint64_t>(wchar_t* value) {
13087 return xtd::convert::to_uint64(value);
13088 }
13089
13104 template<>
13105 inline ullong_t as<ullong_t>(std::any value) {
13106 return xtd::convert::to_ullong(value);
13107 }
13108
13122 template<>
13123 inline ullong_t as<ullong_t>(bool value) {
13124 return xtd::convert::to_ullong(value);
13125 }
13126
13140 template<>
13141 inline ullong_t as<ullong_t>(byte_t value) {
13142 return xtd::convert::to_ullong(value);
13143 }
13144
13159 template<>
13160 inline ullong_t as<ullong_t>(char value) {
13161 return xtd::convert::to_ullong(value);
13162 }
13163
13178 template<>
13179 inline ullong_t as<ullong_t>(char8_t value) {
13180 return xtd::convert::to_ullong(value);
13181 }
13182
13197 template<>
13198 inline ullong_t as<ullong_t>(char16_t value) {
13199 return xtd::convert::to_ullong(value);
13200 }
13201
13216 template<>
13217 inline ullong_t as<ullong_t>(char32_t value) {
13218 return xtd::convert::to_ullong(value);
13219 }
13220
13235 template<>
13236 inline ullong_t as<ullong_t>(wchar_t value) {
13237 return xtd::convert::to_ullong(value);
13238 }
13239
13253 template<>
13254 inline ullong_t as<ullong_t>(decimal_t value) {
13255 return xtd::convert::to_ullong(value);
13256 }
13257
13271 template<>
13272 inline ullong_t as<ullong_t>(double value) {
13273 return xtd::convert::to_ullong(value);
13274 }
13275
13289 template<>
13290 inline ullong_t as<ullong_t>(float value) {
13291 return xtd::convert::to_ullong(value);
13292 }
13293
13307 template<>
13308 inline ullong_t as<ullong_t>(int16_t value) {
13309 return xtd::convert::to_ullong(value);
13310 }
13311
13325 template<>
13326 inline ullong_t as<ullong_t>(int32_t value) {
13327 return xtd::convert::to_ullong(value);
13328 }
13329
13343 template<>
13344 inline ullong_t as<ullong_t>(int64_t value) {
13345 return xtd::convert::to_ullong(value);
13346 }
13347
13361 template<>
13362 inline ullong_t as<ullong_t>(llong_t value) {
13363 return xtd::convert::to_ullong(value);
13364 }
13365
13379 template<>
13380 inline ullong_t as<ullong_t>(sbyte_t value) {
13381 return xtd::convert::to_ullong(value);
13382 }
13383
13397 template<>
13398 inline ullong_t as<ullong_t>(uint16_t value) {
13399 return xtd::convert::to_ullong(value);
13400 }
13401
13415 template<>
13416 inline ullong_t as<ullong_t>(uint32_t value) {
13417 return xtd::convert::to_ullong(value);
13418 }
13419
13433 template<>
13434 inline ullong_t as<ullong_t>(uint64_t value) {
13435 return xtd::convert::to_ullong(value);
13436 }
13437
13451 template<>
13452 inline ullong_t as<ullong_t>(ullong_t value) {
13453 return xtd::convert::to_ullong(value);
13454 }
13455
13470 template<>
13471 inline ullong_t as<ullong_t>(const xtd::ustring& value) {
13472 return xtd::convert::to_ullong(value);
13473 }
13474
13490 template<>
13491 inline ullong_t as<ullong_t>(const xtd::ustring& value, byte_t from_base) {
13492 return xtd::convert::to_ullong(value, from_base);
13493 }
13494
13509 template<>
13510 inline ullong_t as<ullong_t>(const std::string& value) {
13511 return xtd::convert::to_ullong(value);
13512 }
13513
13528 template<>
13529 inline ullong_t as<ullong_t>(const std::u8string& value) {
13530 return xtd::convert::to_ullong(value);
13531 }
13532
13547 template<>
13548 inline ullong_t as<ullong_t>(const std::u16string& value) {
13549 return xtd::convert::to_ullong(value);
13550 }
13551
13566 template<>
13567 inline ullong_t as<ullong_t>(const std::u32string& value) {
13568 return xtd::convert::to_ullong(value);
13569 }
13570
13585 template<>
13586 inline ullong_t as<ullong_t>(const std::wstring& value) {
13587 return xtd::convert::to_ullong(value);
13588 }
13589
13604 template<>
13605 inline ullong_t as<ullong_t>(const char* value) {
13606 return xtd::convert::to_ullong(value);
13607 }
13608
13623 template<>
13624 inline ullong_t as<ullong_t>(char* value) {
13625 return xtd::convert::to_ullong(value);
13626 }
13627
13642 template<>
13643 inline ullong_t as<ullong_t>(const char8_t* value) {
13644 return xtd::convert::to_ullong(value);
13645 }
13646
13661 template<>
13662 inline ullong_t as<ullong_t>(char8_t* value) {
13663 return xtd::convert::to_ullong(value);
13664 }
13665
13680 template<>
13681 inline ullong_t as<ullong_t>(const char16_t* value) {
13682 return xtd::convert::to_ullong(value);
13683 }
13684
13699 template<>
13700 inline ullong_t as<ullong_t>(char16_t* value) {
13701 return xtd::convert::to_ullong(value);
13702 }
13703
13718 template<>
13719 inline ullong_t as<ullong_t>(const char32_t* value) {
13720 return xtd::convert::to_ullong(value);
13721 }
13722
13737 template<>
13738 inline ullong_t as<ullong_t>(char32_t* value) {
13739 return xtd::convert::to_ullong(value);
13740 }
13741
13756 template<>
13757 inline ullong_t as<ullong_t>(const wchar_t* value) {
13758 return xtd::convert::to_ullong(value);
13759 }
13760
13775 template<>
13776 inline ullong_t as<ullong_t>(wchar_t* value) {
13777 return xtd::convert::to_ullong(value);
13778 }
13779
13794 template<>
13795 inline ustring as<ustring>(std::any value) {
13796 return xtd::convert::to_string(value);
13797 }
13798
13812 template<>
13813 inline ustring as<ustring>(bool value) {
13814 return xtd::convert::to_string(value);
13815 }
13816
13830 template<>
13831 inline ustring as<ustring>(byte_t value) {
13832 return xtd::convert::to_string(value);
13833 }
13834
13850 template<>
13851 inline ustring as<ustring>(byte_t value, byte_t from_base) {
13852 return xtd::convert::to_string(value, from_base);
13853 }
13854
13869 template<>
13870 inline ustring as<ustring>(char value) {
13871 return xtd::convert::to_string(value);
13872 }
13873
13888 template<>
13889 inline ustring as<ustring>(char8_t value) {
13890 return xtd::convert::to_string(value);
13891 }
13892
13907 template<>
13908 inline ustring as<ustring>(char16_t value) {
13909 return xtd::convert::to_string(value);
13910 }
13911
13926 template<>
13927 inline ustring as<ustring>(char32_t value) {
13928 return xtd::convert::to_string(value);
13929 }
13930
13945 template<>
13946 inline ustring as<ustring>(wchar_t value) {
13947 return xtd::convert::to_string(value);
13948 }
13949
13963 template<>
13964 inline ustring as<ustring>(decimal_t value) {
13965 return xtd::convert::to_string(value);
13966 }
13967
13981 template<>
13982 inline ustring as<ustring>(double value) {
13983 return xtd::convert::to_string(value);
13984 }
13985
13999 template<>
14000 inline ustring as<ustring>(float value) {
14001 return xtd::convert::to_string(value);
14002 }
14003
14017 template<>
14018 inline ustring as<ustring>(int16_t value) {
14019 return xtd::convert::to_string(value);
14020 }
14021
14037 template<>
14038 inline ustring as<ustring>(int16_t value, byte_t from_base) {
14039 return xtd::convert::to_string(value, from_base);
14040 }
14041
14055 template<>
14056 inline ustring as<ustring>(int32_t value) {
14057 return xtd::convert::to_string(value);
14058 }
14059
14075 template<>
14076 inline ustring as<ustring>(int32_t value, byte_t from_base) {
14077 return xtd::convert::to_string(value, from_base);
14078 }
14079
14093 template<>
14094 inline ustring as<ustring>(int64_t value) {
14095 return xtd::convert::to_string(value);
14096 }
14097
14113 template<>
14114 inline ustring as<ustring>(int64_t value, byte_t from_base) {
14115 return xtd::convert::to_string(value, from_base);
14116 }
14117
14131 template<>
14132 inline ustring as<ustring>(llong_t value) {
14133 return xtd::convert::to_string(value);
14134 }
14135
14151 template<>
14152 inline ustring as<ustring>(llong_t value, byte_t from_base) {
14153 return xtd::convert::to_string(value, from_base);
14154 }
14155
14169 template<>
14170 inline ustring as<ustring>(sbyte_t value) {
14171 return xtd::convert::to_string(value);
14172 }
14173
14189 template<>
14190 inline ustring as<ustring>(sbyte_t value, byte_t from_base) {
14191 return xtd::convert::to_string(value, from_base);
14192 }
14193
14207 template<>
14208 inline ustring as<ustring>(uint16_t value) {
14209 return xtd::convert::to_string(value);
14210 }
14211
14227 template<>
14228 inline ustring as<ustring>(uint16_t value, byte_t from_base) {
14229 return xtd::convert::to_string(value, from_base);
14230 }
14231
14245 template<>
14246 inline ustring as<ustring>(uint32_t value) {
14247 return xtd::convert::to_string(value);
14248 }
14249
14265 template<>
14266 inline ustring as<ustring>(uint32_t value, byte_t from_base) {
14267 return xtd::convert::to_string(value, from_base);
14268 }
14269
14283 template<>
14284 inline ustring as<ustring>(uint64_t value) {
14285 return xtd::convert::to_string(value);
14286 }
14287
14303 template<>
14304 inline ustring as<ustring>(uint64_t value, byte_t from_base) {
14305 return xtd::convert::to_string(value, from_base);
14306 }
14307
14321 template<>
14322 inline ustring as<ustring>(ullong_t value) {
14323 return xtd::convert::to_string(value);
14324 }
14325
14341 template<>
14342 inline ustring as<ustring>(ullong_t value, byte_t from_base) {
14343 return xtd::convert::to_string(value, from_base);
14344 }
14345
14346 // ___________________________________________________________________________________________
14347 // xtd::convert_pointer specialization
14348
14361 template<typename new_type_t, typename current_type_t>
14362 const new_type_t& as(const current_type_t& value) {
14363 return xtd::convert_pointer::to_ref<new_type_t>(value);
14364 }
14365
14378 template<typename new_type_t, typename current_type_t>
14379 new_type_t& as(current_type_t& value) {
14380 return xtd::convert_pointer::to_ref<new_type_t>(value);
14381 }
14382
14394 template<typename new_type_t, typename current_type_t>
14395 const new_type_t* as(const current_type_t* value) {
14396 return xtd::convert_pointer::to_ptr<new_type_t>(value);
14397 }
14398
14410 template<typename new_type_t, typename current_type_t>
14411 new_type_t* as(current_type_t* value) {
14412 return xtd::convert_pointer::to_ptr<new_type_t>(value);
14413 }
14414
14427 template<typename new_type_t, typename current_type_t>
14428 std::unique_ptr<new_type_t> as(std::unique_ptr<current_type_t>& value) {
14429 return xtd::convert_pointer::to_unique_ptr<new_type_t>(value);
14430 }
14431
14443 template<typename new_type_t, typename current_type_t>
14444 std::unique_ptr<new_type_t> as(std::unique_ptr<current_type_t>&& value) {
14445 return xtd::convert_pointer::to_unique_ptr<new_type_t>(value);
14446 }
14447
14460 template<typename new_type_t, typename current_type_t>
14461 std::shared_ptr<new_type_t> as(const std::shared_ptr<current_type_t>& value) {
14462 return xtd::convert_pointer::to_shared_ptr<new_type_t>(value);
14463 }
14464
14476 template<typename new_type_t, typename current_type_t>
14477 std::shared_ptr<new_type_t> as(std::shared_ptr<current_type_t>& value) {
14478 return xtd::convert_pointer::to_shared_ptr<new_type_t>(value);
14479 }
14480
14493 template<typename new_type_t, typename current_type_t>
14494 std::shared_ptr<new_type_t> as(std::shared_ptr<current_type_t>&& value) {
14495 return xtd::convert_pointer::to_shared_ptr<new_type_t>(value);
14496 }
14497
14498 // ___________________________________________________________________________________________
14499 // xtd::convert_string specialization
14500
14512 template<>
14513 inline std::string as<std::string>(const std::string& value) {
14514 return xtd::convert_string::to_string(value);
14515 }
14520 template<>
14521 inline std::string as<std::string>(std::string& value) {
14522 return xtd::convert_string::to_string(value);
14523 }
14524
14536 template<>
14537 inline xtd::ustring as<xtd::ustring>(const std::string& value) {
14538 return xtd::convert_string::to_ustring(value);
14539 }
14540
14552 template<>
14553 inline xtd::ustring as<xtd::ustring>(std::string& value) {
14554 return xtd::convert_string::to_ustring(value);
14555 }
14556
14568 template<>
14569 inline std::u8string as<std::u8string>(const std::string& value) {
14571 }
14572
14584 template<>
14585 inline std::u8string as<std::u8string>(std::string& value) {
14587 }
14588
14600 template<>
14601 inline std::u16string as<std::u16string>(const std::string& value) {
14603 }
14604
14616 template<>
14617 inline std::u16string as<std::u16string>(std::string& value) {
14619 }
14620
14632 template<>
14633 inline std::u32string as<std::u32string>(const std::string& value) {
14635 }
14636
14648 template<>
14649 inline std::u32string as<std::u32string>(std::string& value) {
14651 }
14652
14664 template<>
14665 inline std::wstring as<std::wstring>(const std::string& value) {
14666 return xtd::convert_string::to_wstring(value);
14667 }
14668
14680 template<>
14681 inline std::wstring as<std::wstring>(std::string& value) {
14682 return xtd::convert_string::to_wstring(value);
14683 }
14684
14696 template<>
14697 inline std::string as<std::string>(const char* value) {
14698 return xtd::convert_string::to_string(value);
14699 }
14700
14712 template<>
14713 inline xtd::ustring as<xtd::ustring>(const char* value) {
14714 return xtd::convert_string::to_ustring(value);
14715 }
14716
14728 template<>
14729 inline std::u8string as<std::u8string>(const char* value) {
14731 }
14732
14744 template<>
14745 inline std::u16string as<std::u16string>(const char* value) {
14747 }
14748
14760 template<>
14761 inline std::u32string as<std::u32string>(const char* value) {
14763 }
14764
14776 template<>
14777 inline std::wstring as<std::wstring>(const char* value) {
14778 return xtd::convert_string::to_wstring(value);
14779 }
14780
14792 template<>
14793 inline std::string as<std::string>(char* value) {
14794 return xtd::convert_string::to_string(value);
14795 }
14796
14808 template<>
14809 inline xtd::ustring as<xtd::ustring>(char* value) {
14810 return xtd::convert_string::to_ustring(value);
14811 }
14812
14824 template<>
14825 inline std::u8string as<std::u8string>(char* value) {
14827 }
14828
14840 template<>
14841 inline std::u16string as<std::u16string>(char* value) {
14843 }
14844
14856 template<>
14857 inline std::u32string as<std::u32string>(char* value) {
14859 }
14860
14872 template<>
14873 inline std::wstring as<std::wstring>(char* value) {
14874 return xtd::convert_string::to_wstring(value);
14875 }
14876
14888 template<>
14889 inline std::string as<std::string>(const xtd::ustring& value) {
14890 return xtd::convert_string::to_string(value);
14891 }
14892
14904 template<>
14905 inline std::string as<std::string>(xtd::ustring& value) {
14906 return xtd::convert_string::to_string(value);
14907 }
14908
14920 template<>
14922 return xtd::convert_string::to_ustring(value);
14923 }
14924
14936 template<>
14938 return xtd::convert_string::to_ustring(value);
14939 }
14940
14952 template<>
14953 inline std::u8string as<std::u8string>(const xtd::ustring& value) {
14955 }
14956
14968 template<>
14969 inline std::u8string as<std::u8string>(xtd::ustring& value) {
14971 }
14972
14984 template<>
14985 inline std::u16string as<std::u16string>(const xtd::ustring& value) {
14987 }
14988
15000 template<>
15001 inline std::u16string as<std::u16string>(xtd::ustring& value) {
15003 }
15004
15016 template<>
15017 inline std::u32string as<std::u32string>(const xtd::ustring& value) {
15019 }
15020
15032 template<>
15033 inline std::u32string as<std::u32string>(xtd::ustring& value) {
15035 }
15036
15048 template<>
15049 inline std::wstring as<std::wstring>(const xtd::ustring& value) {
15050 return xtd::convert_string::to_wstring(value);
15051 }
15052
15064 template<>
15065 inline std::wstring as<std::wstring>(xtd::ustring& value) {
15066 return xtd::convert_string::to_wstring(value);
15067 }
15068
15080 template<>
15081 inline std::string as<std::string>(const std::u8string& value) {
15082 return xtd::convert_string::to_string(value);
15083 }
15084
15096 template<>
15097 inline std::string as<std::string>(std::u8string& value) {
15098 return xtd::convert_string::to_string(value);
15099 }
15100
15112 template<>
15113 inline xtd::ustring as<xtd::ustring>(const std::u8string& value) {
15114 return xtd::convert_string::to_ustring(value);
15115 }
15116
15128 template<>
15129 inline xtd::ustring as<xtd::ustring>(std::u8string& value) {
15130 return xtd::convert_string::to_ustring(value);
15131 }
15132
15144 template<>
15145 inline std::u8string as<std::u8string>(const std::u8string& value) {
15147 }
15148
15160 template<>
15161 inline std::u8string as<std::u8string>(std::u8string& value) {
15163 }
15164
15176 template<>
15177 inline std::u16string as<std::u16string>(const std::u8string& value) {
15179 }
15180
15192 template<>
15193 inline std::u16string as<std::u16string>(std::u8string& value) {
15195 }
15196
15208 template<>
15209 inline std::u32string as<std::u32string>(const std::u8string& value) {
15211 }
15212
15224 template<>
15225 inline std::u32string as<std::u32string>(std::u8string& value) {
15227 }
15228
15240 template<>
15241 inline std::wstring as<std::wstring>(const std::u8string& value) {
15242 return xtd::convert_string::to_wstring(value);
15243 }
15244
15256 template<>
15257 inline std::wstring as<std::wstring>(std::u8string& value) {
15258 return xtd::convert_string::to_wstring(value);
15259 }
15260
15272 template<>
15273 inline std::string as<std::string>(const char8_t* value) {
15274 return xtd::convert_string::to_string(value);
15275 }
15276
15288 template<>
15289 inline xtd::ustring as<xtd::ustring>(const char8_t* value) {
15290 return xtd::convert_string::to_ustring(value);
15291 }
15292
15304 template<>
15305 inline std::u8string as<std::u8string>(const char8_t* value) {
15307 }
15308
15320 template<>
15321 inline std::u16string as<std::u16string>(const char8_t* value) {
15323 }
15324
15336 template<>
15337 inline std::u32string as<std::u32string>(const char8_t* value) {
15339 }
15340
15352 template<>
15353 inline std::wstring as<std::wstring>(const char8_t* value) {
15354 return xtd::convert_string::to_wstring(value);
15355 }
15356
15368 template<>
15369 inline std::string as<std::string>(char8_t* value) {
15370 return xtd::convert_string::to_string(value);
15371 }
15372
15384 template<>
15385 inline xtd::ustring as<xtd::ustring>(char8_t* value) {
15386 return xtd::convert_string::to_ustring(value);
15387 }
15388
15400 template<>
15401 inline std::u8string as<std::u8string>(char8_t* value) {
15403 }
15404
15416 template<>
15417 inline std::u16string as<std::u16string>(char8_t* value) {
15419 }
15420
15432 template<>
15433 inline std::u32string as<std::u32string>(char8_t* value) {
15435 }
15436
15448 template<>
15449 inline std::wstring as<std::wstring>(char8_t* value) {
15450 return xtd::convert_string::to_wstring(value);
15451 }
15452
15464 template<>
15465 inline std::string as<std::string>(const std::u16string& value) {
15466 return xtd::convert_string::to_string(value);
15467 }
15468
15480 template<>
15481 inline std::string as<std::string>(std::u16string& value) {
15482 return xtd::convert_string::to_string(value);
15483 }
15484
15496 template<>
15497 inline xtd::ustring as<xtd::ustring>(const std::u16string& value) {
15498 return xtd::convert_string::to_ustring(value);
15499 }
15500
15512 template<>
15513 inline xtd::ustring as<xtd::ustring>(std::u16string& value) {
15514 return xtd::convert_string::to_ustring(value);
15515 }
15516
15528 template<>
15529 inline std::u8string as<std::u8string>(const std::u16string& value) {
15531 }
15532
15544 template<>
15545 inline std::u8string as<std::u8string>(std::u16string& value) {
15547 }
15548
15560 template<>
15561 inline std::u16string as<std::u16string>(const std::u16string& value) {
15563 }
15564
15576 template<>
15577 inline std::u16string as<std::u16string>(std::u16string& value) {
15579 }
15580
15592 template<>
15593 inline std::u32string as<std::u32string>(const std::u16string& value) {
15595 }
15596
15608 template<>
15609 inline std::u32string as<std::u32string>(std::u16string& value) {
15611 }
15612
15624 template<>
15625 inline std::wstring as<std::wstring>(const std::u16string& value) {
15626 return xtd::convert_string::to_wstring(value);
15627 }
15628
15640 template<>
15641 inline std::wstring as<std::wstring>(std::u16string& value) {
15642 return xtd::convert_string::to_wstring(value);
15643 }
15644
15656 template<>
15657 inline std::string as<std::string>(const char16_t* value) {
15658 return xtd::convert_string::to_string(value);
15659 }
15660
15672 template<>
15673 inline xtd::ustring as<xtd::ustring>(const char16_t* value) {
15674 return xtd::convert_string::to_ustring(value);
15675 }
15676
15688 template<>
15689 inline std::u8string as<std::u8string>(const char16_t* value) {
15691 }
15692
15704 template<>
15705 inline std::u16string as<std::u16string>(const char16_t* value) {
15707 }
15708
15720 template<>
15721 inline std::u32string as<std::u32string>(const char16_t* value) {
15723 }
15724
15736 template<>
15737 inline std::wstring as<std::wstring>(const char16_t* value) {
15738 return xtd::convert_string::to_wstring(value);
15739 }
15740
15752 template<>
15753 inline std::string as<std::string>(char16_t* value) {
15754 return xtd::convert_string::to_string(value);
15755 }
15756
15768 template<>
15769 inline xtd::ustring as<xtd::ustring>(char16_t* value) {
15770 return xtd::convert_string::to_ustring(value);
15771 }
15772
15784 template<>
15785 inline std::u8string as<std::u8string>(char16_t* value) {
15787 }
15788
15800 template<>
15801 inline std::u16string as<std::u16string>(char16_t* value) {
15803 }
15804
15816 template<>
15817 inline std::u32string as<std::u32string>(char16_t* value) {
15819 }
15820
15832 template<>
15833 inline std::wstring as<std::wstring>(char16_t* value) {
15834 return xtd::convert_string::to_wstring(value);
15835 }
15836
15848 template<>
15849 inline std::string as<std::string>(const std::u32string& value) {
15850 return xtd::convert_string::to_string(value);
15851 }
15852
15864 template<>
15865 inline std::string as<std::string>(std::u32string& value) {
15866 return xtd::convert_string::to_string(value);
15867 }
15868
15880 template<>
15881 inline xtd::ustring as<xtd::ustring>(const std::u32string& value) {
15882 return xtd::convert_string::to_ustring(value);
15883 }
15884
15896 template<>
15897 inline xtd::ustring as<xtd::ustring>(std::u32string& value) {
15898 return xtd::convert_string::to_ustring(value);
15899 }
15900
15912 template<>
15913 inline std::u8string as<std::u8string>(const std::u32string& value) {
15915 }
15916
15928 template<>
15929 inline std::u8string as<std::u8string>(std::u32string& value) {
15931 }
15932
15944 template<>
15945 inline std::u16string as<std::u16string>(const std::u32string& value) {
15947 }
15948
15960 template<>
15961 inline std::u16string as<std::u16string>(std::u32string& value) {
15963 }
15964
15976 template<>
15977 inline std::u32string as<std::u32string>(const std::u32string& value) {
15979 }
15980
15992 template<>
15993 inline std::u32string as<std::u32string>(std::u32string& value) {
15995 }
15996
16008 template<>
16009 inline std::wstring as<std::wstring>(const std::u32string& value) {
16010 return xtd::convert_string::to_wstring(value);
16011 }
16012
16024 template<>
16025 inline std::wstring as<std::wstring>(std::u32string& value) {
16026 return xtd::convert_string::to_wstring(value);
16027 }
16028
16040 template<>
16041 inline std::string as<std::string>(const char32_t* value) {
16042 return xtd::convert_string::to_string(value);
16043 }
16044
16056 template<>
16057 inline xtd::ustring as<xtd::ustring>(const char32_t* value) {
16058 return xtd::convert_string::to_ustring(value);
16059 }
16060
16072 template<>
16073 inline std::u8string as<std::u8string>(const char32_t* value) {
16075 }
16076
16088 template<>
16089 inline std::u16string as<std::u16string>(const char32_t* value) {
16091 }
16092
16104 template<>
16105 inline std::u32string as<std::u32string>(const char32_t* value) {
16107 }
16108
16120 template<>
16121 inline std::wstring as<std::wstring>(const char32_t* value) {
16122 return xtd::convert_string::to_wstring(value);
16123 }
16124
16136 template<>
16137 inline std::string as<std::string>(char32_t* value) {
16138 return xtd::convert_string::to_string(value);
16139 }
16140
16152 template<>
16153 inline xtd::ustring as<xtd::ustring>(char32_t* value) {
16154 return xtd::convert_string::to_ustring(value);
16155 }
16156
16168 template<>
16169 inline std::u8string as<std::u8string>(char32_t* value) {
16171 }
16172
16184 template<>
16185 inline std::u16string as<std::u16string>(char32_t* value) {
16187 }
16188
16200 template<>
16201 inline std::u32string as<std::u32string>(char32_t* value) {
16203 }
16204
16216 template<>
16217 inline std::wstring as<std::wstring>(char32_t* value) {
16218 return xtd::convert_string::to_wstring(value);
16219 }
16220
16232 template<>
16233 inline std::string as<std::string>(const std::wstring& value) {
16234 return xtd::convert_string::to_string(value);
16235 }
16236
16248 template<>
16249 inline std::string as<std::string>(std::wstring& value) {
16250 return xtd::convert_string::to_string(value);
16251 }
16252
16264 template<>
16265 inline xtd::ustring as<xtd::ustring>(const std::wstring& value) {
16266 return xtd::convert_string::to_ustring(value);
16267 }
16268
16280 template<>
16281 inline xtd::ustring as<xtd::ustring>(std::wstring& value) {
16282 return xtd::convert_string::to_ustring(value);
16283 }
16284
16296 template<>
16297 inline std::u8string as<std::u8string>(const std::wstring& value) {
16299 }
16300
16312 template<>
16313 inline std::u8string as<std::u8string>(std::wstring& value) {
16315 }
16316
16328 template<>
16329 inline std::u16string as<std::u16string>(const std::wstring& value) {
16331 }
16332
16344 template<>
16345 inline std::u16string as<std::u16string>(std::wstring& value) {
16347 }
16348
16360 template<>
16361 inline std::u32string as<std::u32string>(const std::wstring& value) {
16363 }
16364
16376 template<>
16377 inline std::u32string as<std::u32string>(std::wstring& value) {
16379 }
16380
16392 template<>
16393 inline std::wstring as<std::wstring>(const std::wstring& value) {
16394 return xtd::convert_string::to_wstring(value);
16395 }
16396
16408 template<>
16409 inline std::wstring as<std::wstring>(std::wstring& value) {
16410 return xtd::convert_string::to_wstring(value);
16411 }
16412
16424 template<>
16425 inline std::string as<std::string>(const wchar_t* value) {
16426 return xtd::convert_string::to_string(value);
16427 }
16428
16440 template<>
16441 inline xtd::ustring as<xtd::ustring>(const wchar_t* value) {
16442 return xtd::convert_string::to_ustring(value);
16443 }
16444
16456 template<>
16457 inline std::u8string as<std::u8string>(const wchar_t* value) {
16459 }
16460
16472 template<>
16473 inline std::u16string as<std::u16string>(const wchar_t* value) {
16475 }
16476
16488 template<>
16489 inline std::u32string as<std::u32string>(const wchar_t* value) {
16491 }
16492
16504 template<>
16505 inline std::wstring as<std::wstring>(const wchar_t* value) {
16506 return xtd::convert_string::to_wstring(value);
16507 }
16508
16520 template<>
16521 inline std::string as<std::string>(wchar_t* value) {
16522 return xtd::convert_string::to_string(value);
16523 }
16524
16536 template<>
16537 inline xtd::ustring as<xtd::ustring>(wchar_t* value) {
16538 return xtd::convert_string::to_ustring(value);
16539 }
16540
16552 template<>
16553 inline std::u8string as<std::u8string>(wchar_t* value) {
16555 }
16556
16568 template<>
16569 inline std::u16string as<std::u16string>(wchar_t* value) {
16571 }
16572
16584 template<>
16585 inline std::u32string as<std::u32string>(wchar_t* value) {
16587 }
16588
16600 template<>
16601 inline std::wstring as<std::wstring>(wchar_t* value) {
16602 return xtd::convert_string::to_wstring(value);
16603 }
16604}
static std::u32string to_u32string(const std::string &str) noexcept
Converts std::string to std::u32string.
static std::u8string to_u8string(const std::string &str) noexcept
Converts std::string to std::u8string.
static xtd::ustring to_ustring(const std::string &str) noexcept
Converts std::string to xtd::ustring.
static const std::string & to_string(const std::string &str) noexcept
Converts std::string to std::string.
static std::u16string to_u16string(const std::string &str) noexcept
Converts std::string to std::u16string.
static std::wstring to_wstring(const std::string &str) noexcept
Converts std::string to std::wstring.
static double to_double(std::any value)
Convert std::any to double.
static char16_t to_char16(std::any value)
Convert std::any to char16.
static ustring to_string(std::any value)
Convert std::any to ustring.
static int64_t to_int64(std::any value)
Convert std::any to int64.
static bool to_boolean(std::any value)
Convert std::any to bool.
static byte_t to_byte(std::any value)
Convert std::any to byte.
static char8_t to_char8(std::any value)
Convert std::any to char8.
static float to_single(std::any value)
Convert std::any to single.
static sbyte_t to_sbyte(std::any value)
Convert std::any to sbyte.
static int16_t to_int16(std::any value)
Convert std::any to int16.
static ullong_t to_ullong(type_t value) noexcept
Convert type_t to ullong.
Definition: convert.h:4731
static uint32_t to_uint32(std::any value)
Convert std::any to uint32.
static uint64_t to_uint64(std::any value)
Convert std::any to uint64.
static int32_t to_int32(std::any value)
Convert std::any to int32.
static wchar_t to_wchar(std::any value)
Convert std::any to wchar.
static char32_t to_char32(std::any value)
Convert std::any to char32.
static decimal_t to_decimal(std::any value)
Convert std::any to decimal.
static char to_char(std::any value)
Convert std::any to char.
static uint16_t to_uint16(std::any value)
Convert std::any to uint16.
static llong_t to_llong(std::any value)
Convert std::any to llong.
The exception that is thrown for invalid casting or explicit conversion.
Definition: invalid_cast_exception.h:18
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::convert class.
Contains xtd::convert class.
Contains xtd::convert_string class.
#define csf_
Provides information about the current stack frame.
Definition: stack_frame.h:213
float as< float >(std::any value)
Casts a type into another type.
Definition: as.h:6915
std::u32string as< std::u32string >(const std::string &value)
Casts a type into another type.
Definition: as.h:14633
char16_t as< char16_t >(std::any value)
Casts a type into another type.
Definition: as.h:3565
new_type_t as(std::any value)
Casts a type into another type.
Definition: as.h:32
int16_t as< int16_t >(std::any value)
Casts a type into another type.
Definition: as.h:7585
uint64_t as< uint64_t >(std::any value)
Casts a type into another type.
Definition: as.h:12415
byte_t as< byte_t >(std::any value)
Casts a type into another type.
Definition: as.h:1535
wchar_t as< wchar_t >(std::any value)
Casts a type into another type.
Definition: as.h:4905
char32_t as< char32_t >(std::any value)
Casts a type into another type.
Definition: as.h:4235
int64_t as< int64_t >(std::any value)
Casts a type into another type.
Definition: as.h:8965
std::wstring as< std::wstring >(const std::string &value)
Casts a type into another type.
Definition: as.h:14665
xtd::ustring as< xtd::ustring >(const std::string &value)
Casts a type into another type.
Definition: as.h:14537
std::string as< std::string >(const std::string &value)
Casts a type into another type.
Definition: as.h:14513
char8_t as< char8_t >(std::any value)
Casts a type into another type.
Definition: as.h:2895
std::u16string as< std::u16string >(const std::string &value)
Casts a type into another type.
Definition: as.h:14601
llong_t as< llong_t >(std::any value)
Casts a type into another type.
Definition: as.h:9655
std::u8string as< std::u8string >(const std::string &value)
Casts a type into another type.
Definition: as.h:14569
ustring as< ustring >(std::any value)
Casts a type into another type.
Definition: as.h:13795
ullong_t as< ullong_t >(std::any value)
Casts a type into another type.
Definition: as.h:13105
uint32_t as< uint32_t >(std::any value)
Casts a type into another type.
Definition: as.h:11725
double as< double >(std::any value)
Casts a type into another type.
Definition: as.h:6245
sbyte_t as< sbyte_t >(std::any value)
Casts a type into another type.
Definition: as.h:10345
char as< char >(std::any value)
Casts a type into another type.
Definition: as.h:2225
decimal_t as< decimal_t >(std::any value)
Casts a type into another type.
Definition: as.h:5575
int32_t as< int32_t >(std::any value)
Casts a type into another type.
Definition: as.h:8275
uint16_t as< uint16_t >(std::any value)
Casts a type into another type.
Definition: as.h:11035
bool as< bool >(std::any value)
Casts a type into another type.
Definition: as.h:865
@ e
The E key.
Contains xtd::invalid_cast_exception exception.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd fundamental types.