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>(xtd::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
125 template<>
126 inline slong as<slong>(char8 value) {
127 return xtd::convert::to_llong(value);
128 }
129
148 template<>
149 inline slong as<slong>(char16 value) {
150 return xtd::convert::to_llong(value);
151 }
152
171 template<>
172 inline slong as<slong>(char32 value) {
173 return xtd::convert::to_llong(value);
174 }
175
194 template<>
195 inline slong as<slong>(wchar value) {
196 return xtd::convert::to_llong(value);
197 }
198
216 template<>
217 inline slong as<slong>(decimal value) {
218 return xtd::convert::to_llong(value);
219 }
220
238 template<>
239 inline slong as<slong>(double value) {
240 return xtd::convert::to_llong(value);
241 }
242
260 template<>
261 inline slong as<slong>(float value) {
262 return xtd::convert::to_llong(value);
263 }
264
282 template<>
283 inline slong as<slong>(int16 value) {
284 return xtd::convert::to_llong(value);
285 }
286
304 template<>
305 inline slong as<slong>(int32 value) {
306 return xtd::convert::to_llong(value);
307 }
308
326 template<>
327 inline slong as<slong>(int64 value) {
328 return xtd::convert::to_llong(value);
329 }
330
348 template<>
349 inline slong as<slong>(slong value) {
350 return xtd::convert::to_llong(value);
351 }
352
370 template<>
371 inline slong as<slong>(sbyte value) {
372 return xtd::convert::to_llong(value);
373 }
374
392 template<>
393 inline slong as<slong>(uint16 value) {
394 return xtd::convert::to_llong(value);
395 }
396
414 template<>
415 inline slong as<slong>(uint32 value) {
416 return xtd::convert::to_llong(value);
417 }
418
436 template<>
437 inline slong as<slong>(uint64 value) {
438 return xtd::convert::to_llong(value);
439 }
440
458 template<>
459 inline slong as<slong>(xtd::ulong value) {
460 return xtd::convert::to_llong(value);
461 }
462
481 template<>
482 inline slong as<slong>(const xtd::string& value) {
483 return xtd::convert::to_llong(value);
484 }
485
504 template<>
505 inline slong as<slong>(xtd::string& value) {
506 return xtd::convert::to_llong(value);
507 }
508
528 template<>
529 inline slong as<slong>(const xtd::string& value, xtd::byte from_base) {
530 return xtd::convert::to_llong(value, from_base);
531 }
532
551 template<>
552 inline slong as<slong>(const std::string& value) {
553 return xtd::convert::to_llong(value);
554 }
555
574 template<>
575 inline slong as<slong>(std::string& value) {
576 return xtd::convert::to_llong(value);
577 }
578
597 template<>
598 inline slong as<slong>(const std::u8string& value) {
599 return xtd::convert::to_llong(value);
600 }
601
620 template<>
621 inline slong as<slong>(std::u8string& value) {
622 return xtd::convert::to_llong(value);
623 }
624
643 template<>
644 inline slong as<slong>(const std::u16string& value) {
645 return xtd::convert::to_llong(value);
646 }
647
666 template<>
667 inline slong as<slong>(std::u16string& value) {
668 return xtd::convert::to_llong(value);
669 }
670
689 template<>
690 inline slong as<slong>(const std::u32string& value) {
691 return xtd::convert::to_llong(value);
692 }
693
712 template<>
713 inline slong as<slong>(std::u32string& value) {
714 return xtd::convert::to_llong(value);
715 }
716
735 template<>
736 inline slong as<slong>(const std::wstring& value) {
737 return xtd::convert::to_llong(value);
738 }
739
758 template<>
759 inline slong as<slong>(std::wstring& value) {
760 return xtd::convert::to_llong(value);
761 }
762
781 template<>
782 inline slong as<slong>(const char* value) {
783 return xtd::convert::to_llong(value);
784 }
785
804 template<>
805 inline slong as<slong>(char* value) {
806 return xtd::convert::to_llong(value);
807 }
808
827 template<>
828 inline slong as<slong>(const char8* value) {
829 return xtd::convert::to_llong(value);
830 }
831
850 template<>
851 inline slong as<slong>(char8* value) {
852 return xtd::convert::to_llong(value);
853 }
854
873 template<>
874 inline slong as<slong>(const char16* value) {
875 return xtd::convert::to_llong(value);
876 }
877
896 template<>
897 inline slong as<slong>(char16* value) {
898 return xtd::convert::to_llong(value);
899 }
900
919 template<>
920 inline slong as<slong>(const char32* value) {
921 return xtd::convert::to_llong(value);
922 }
923
942 template<>
943 inline slong as<slong>(char32* value) {
944 return xtd::convert::to_llong(value);
945 }
946
965 template<>
966 inline slong as<slong>(const wchar* value) {
967 return xtd::convert::to_llong(value);
968 }
969
988 template<>
989 inline slong as<slong>(wchar* value) {
990 return xtd::convert::to_llong(value);
991 }
992}
Contains __xtd_std_version definitions.
static slong to_llong(xtd::any value)
Convert xtd::any to slong.
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.hpp:27
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
std::any any
Represents the any alias on std::any.
Definition any.hpp:24
slong as< slong >(xtd::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 abstract_object.hpp:8