xtd 0.2.0
Loading...
Searching...
No Matches
__as_slong.hpp
Go to the documentation of this file.
1
3#pragma once
4
6#if !defined(__XTD_CORE_INTERNAL__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#define __XTD_STD_INTERNAL__
12#include "__xtd_std_version.hpp"
13#undef __XTD_STD_INTERNAL__
14
16namespace xtd {
35 template<>
36 inline slong as<slong>(std::any value) {
37 return xtd::convert::to_llong(value);
38 }
39
57 template<>
58 inline slong as<slong>(bool value) {
59 return xtd::convert::to_llong(value);
60 }
61
79 template<>
80 inline slong as<slong>(xtd::byte value) {
81 return xtd::convert::to_llong(value);
82 }
83
102 template<>
103 inline slong as<slong>(char value) {
104 return xtd::convert::to_llong(value);
105 }
106
107#if defined(__xtd__cpp_lib_char8_t)
126 template<>
127 inline slong as<slong>(char8 value) {
128 return xtd::convert::to_llong(value);
129 }
130#endif
131
150 template<>
151 inline slong as<slong>(char16 value) {
152 return xtd::convert::to_llong(value);
153 }
154
173 template<>
174 inline slong as<slong>(char32 value) {
175 return xtd::convert::to_llong(value);
176 }
177
196 template<>
197 inline slong as<slong>(wchar value) {
198 return xtd::convert::to_llong(value);
199 }
200
218 template<>
219 inline slong as<slong>(decimal value) {
220 return xtd::convert::to_llong(value);
221 }
222
240 template<>
241 inline slong as<slong>(double value) {
242 return xtd::convert::to_llong(value);
243 }
244
262 template<>
263 inline slong as<slong>(float value) {
264 return xtd::convert::to_llong(value);
265 }
266
284 template<>
285 inline slong as<slong>(int16 value) {
286 return xtd::convert::to_llong(value);
287 }
288
306 template<>
307 inline slong as<slong>(int32 value) {
308 return xtd::convert::to_llong(value);
309 }
310
328 template<>
329 inline slong as<slong>(int64 value) {
330 return xtd::convert::to_llong(value);
331 }
332
350 template<>
351 inline slong as<slong>(slong value) {
352 return xtd::convert::to_llong(value);
353 }
354
372 template<>
373 inline slong as<slong>(sbyte value) {
374 return xtd::convert::to_llong(value);
375 }
376
394 template<>
395 inline slong as<slong>(uint16 value) {
396 return xtd::convert::to_llong(value);
397 }
398
416 template<>
417 inline slong as<slong>(uint32 value) {
418 return xtd::convert::to_llong(value);
419 }
420
438 template<>
439 inline slong as<slong>(uint64 value) {
440 return xtd::convert::to_llong(value);
441 }
442
460 template<>
461 inline slong as<slong>(xtd::ulong value) {
462 return xtd::convert::to_llong(value);
463 }
464
483 template<>
484 inline slong as<slong>(const xtd::string& value) {
485 return xtd::convert::to_llong(value);
486 }
487
506 template<>
507 inline slong as<slong>(xtd::string& value) {
508 return xtd::convert::to_llong(value);
509 }
510
530 template<>
531 inline slong as<slong>(const xtd::string& value, xtd::byte from_base) {
532 return xtd::convert::to_llong(value, from_base);
533 }
534
553 template<>
554 inline slong as<slong>(const std::string& value) {
555 return xtd::convert::to_llong(value);
556 }
557
576 template<>
577 inline slong as<slong>(std::string& value) {
578 return xtd::convert::to_llong(value);
579 }
580
581#if defined(__xtd__cpp_lib_char8_t)
600 template<>
601 inline slong as<slong>(const std::u8string& value) {
602 return xtd::convert::to_llong(value);
603 }
604
623 template<>
624 inline slong as<slong>(std::u8string& value) {
625 return xtd::convert::to_llong(value);
626 }
627#endif
628
647 template<>
648 inline slong as<slong>(const std::u16string& value) {
649 return xtd::convert::to_llong(value);
650 }
651
670 template<>
671 inline slong as<slong>(std::u16string& value) {
672 return xtd::convert::to_llong(value);
673 }
674
693 template<>
694 inline slong as<slong>(const std::u32string& value) {
695 return xtd::convert::to_llong(value);
696 }
697
716 template<>
717 inline slong as<slong>(std::u32string& value) {
718 return xtd::convert::to_llong(value);
719 }
720
739 template<>
740 inline slong as<slong>(const std::wstring& value) {
741 return xtd::convert::to_llong(value);
742 }
743
762 template<>
763 inline slong as<slong>(std::wstring& value) {
764 return xtd::convert::to_llong(value);
765 }
766
785 template<>
786 inline slong as<slong>(const char* value) {
787 return xtd::convert::to_llong(value);
788 }
789
808 template<>
809 inline slong as<slong>(char* value) {
810 return xtd::convert::to_llong(value);
811 }
812
813#if defined(__xtd__cpp_lib_char8_t)
832 template<>
833 inline slong as<slong>(const char8* value) {
834 return xtd::convert::to_llong(value);
835 }
836
855 template<>
856 inline slong as<slong>(char8* value) {
857 return xtd::convert::to_llong(value);
858 }
859#endif
860
879 template<>
880 inline slong as<slong>(const char16* value) {
881 return xtd::convert::to_llong(value);
882 }
883
902 template<>
903 inline slong as<slong>(char16* value) {
904 return xtd::convert::to_llong(value);
905 }
906
925 template<>
926 inline slong as<slong>(const char32* value) {
927 return xtd::convert::to_llong(value);
928 }
929
948 template<>
949 inline slong as<slong>(char32* value) {
950 return xtd::convert::to_llong(value);
951 }
952
971 template<>
972 inline slong as<slong>(const wchar* value) {
973 return xtd::convert::to_llong(value);
974 }
975
994 template<>
995 inline slong as<slong>(wchar* value) {
996 return xtd::convert::to_llong(value);
997 }
998}
Contains __xtd_std_version definitions.
Represents text as a sequence of character units.
Definition basic_string.hpp:79
static slong to_llong(std::any value)
Convert std::any to slong.
int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:27
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.hpp:27
int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:26
uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
slong as< slong >(std::any value)
Casts a type into another type.
Definition __as_slong.hpp:36
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10