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