xtd 0.2.0
__as_wchar.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 wchar as<wchar>(xtd::any value) {
37 return xtd::convert::to_wchar(value);
38 }
39
57 template<>
58 inline wchar as<wchar>(bool value) {
59 return xtd::convert::to_wchar(value);
60 }
61
79 template<>
80 inline wchar as<wchar>(xtd::byte value) {
81 return xtd::convert::to_wchar(value);
82 }
83
102 template<>
103 inline wchar as<wchar>(char value) {
104 return xtd::convert::to_wchar(value);
105 }
106
125 template<>
126 inline wchar as<wchar>(char8 value) {
127 return xtd::convert::to_wchar(value);
128 }
129
148 template<>
149 inline wchar as<wchar>(char16 value) {
150 return xtd::convert::to_wchar(value);
151 }
152
171 template<>
172 inline wchar as<wchar>(char32 value) {
173 return xtd::convert::to_wchar(value);
174 }
175
194 template<>
195 inline wchar as<wchar>(wchar value) {
196 return xtd::convert::to_wchar(value);
197 }
198
216 template<>
217 inline wchar as<wchar>(decimal value) {
218 return xtd::convert::to_wchar(value);
219 }
220
238 template<>
239 inline wchar as<wchar>(double value) {
240 return xtd::convert::to_wchar(value);
241 }
242
260 template<>
261 inline wchar as<wchar>(float value) {
262 return xtd::convert::to_wchar(value);
263 }
264
282 template<>
283 inline wchar as<wchar>(int16 value) {
284 return xtd::convert::to_wchar(value);
285 }
286
304 template<>
305 inline wchar as<wchar>(int32 value) {
306 return xtd::convert::to_wchar(value);
307 }
308
326 template<>
327 inline wchar as<wchar>(int64 value) {
328 return xtd::convert::to_wchar(value);
329 }
330
348 template<>
349 inline wchar as<wchar>(slong value) {
350 return xtd::convert::to_wchar(value);
351 }
352
370 template<>
371 inline wchar as<wchar>(sbyte value) {
372 return xtd::convert::to_wchar(value);
373 }
374
392 template<>
393 inline wchar as<wchar>(uint16 value) {
394 return xtd::convert::to_wchar(value);
395 }
396
414 template<>
415 inline wchar as<wchar>(uint32 value) {
416 return xtd::convert::to_wchar(value);
417 }
418
436 template<>
437 inline wchar as<wchar>(uint64 value) {
438 return xtd::convert::to_wchar(value);
439 }
440
458 template<>
459 inline wchar as<wchar>(xtd::ulong value) {
460 return xtd::convert::to_wchar(value);
461 }
462
481 template<>
482 inline wchar as<wchar>(const xtd::string& value) {
483 return xtd::convert::to_wchar(value);
484 }
485
504 template<>
505 inline wchar as<wchar>(xtd::string& value) {
506 return xtd::convert::to_wchar(value);
507 }
508
527 template<>
528 inline wchar as<wchar>(const std::string& value) {
529 return xtd::convert::to_wchar(value);
530 }
531
550 template<>
551 inline wchar as<wchar>(std::string& value) {
552 return xtd::convert::to_wchar(value);
553 }
554
573 template<>
574 inline wchar as<wchar>(const std::u8string& value) {
575 return xtd::convert::to_wchar(value);
576 }
577
596 template<>
597 inline wchar as<wchar>(std::u8string& value) {
598 return xtd::convert::to_wchar(value);
599 }
600
619 template<>
620 inline wchar as<wchar>(const std::u16string& value) {
621 return xtd::convert::to_wchar(value);
622 }
623
642 template<>
643 inline wchar as<wchar>(std::u16string& value) {
644 return xtd::convert::to_wchar(value);
645 }
646
665 template<>
666 inline wchar as<wchar>(const std::u32string& value) {
667 return xtd::convert::to_wchar(value);
668 }
669
688 template<>
689 inline wchar as<wchar>(std::u32string& value) {
690 return xtd::convert::to_wchar(value);
691 }
692
711 template<>
712 inline wchar as<wchar>(const std::wstring& value) {
713 return xtd::convert::to_wchar(value);
714 }
715
734 template<>
735 inline wchar as<wchar>(std::wstring& value) {
736 return xtd::convert::to_wchar(value);
737 }
738
757 template<>
758 inline wchar as<wchar>(const char* value) {
759 return xtd::convert::to_wchar(value);
760 }
761
780 template<>
781 inline wchar as<wchar>(char* value) {
782 return xtd::convert::to_wchar(value);
783 }
784
803 template<>
804 inline wchar as<wchar>(const char8* value) {
805 return xtd::convert::to_wchar(value);
806 }
807
826 template<>
827 inline wchar as<wchar>(char8* value) {
828 return xtd::convert::to_wchar(value);
829 }
830
849 template<>
850 inline wchar as<wchar>(const char16* value) {
851 return xtd::convert::to_wchar(value);
852 }
853
872 template<>
873 inline wchar as<wchar>(char16* value) {
874 return xtd::convert::to_wchar(value);
875 }
876
895 template<>
896 inline wchar as<wchar>(const char32* value) {
897 return xtd::convert::to_wchar(value);
898 }
899
918 template<>
919 inline wchar as<wchar>(char32* value) {
920 return xtd::convert::to_wchar(value);
921 }
922
941 template<>
942 inline wchar as<wchar>(const wchar* value) {
943 return xtd::convert::to_wchar(value);
944 }
945
964 template<>
965 inline wchar as<wchar>(wchar* value) {
966 return xtd::convert::to_wchar(value);
967 }
968}
Contains __xtd_std_version definitions.
static wchar to_wchar(xtd::any value)
Convert xtd::any to wchar.
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
wchar as< wchar >(xtd::any value)
Casts a type into another type.
Definition __as_wchar.hpp:36
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8