25#define __XTD_STD_INTERNAL__
27#undef __XTD_STD_INTERNAL__
47 template<
class type_t>
52 template<
class type_t>
55 template<
class type_t>
56 inline type_t
unboxing(
const xtd::enum_object<type_t>& value)
noexcept {
return value.value();}
58 template<
class type_t>
59 inline type_t
unboxing(xtd::enum_object<type_t>& value)
noexcept {
return value.value();}
61 inline const object&
unboxing(
const object& value)
noexcept {
return value;}
62 inline object&
unboxing(
object& value)
noexcept {
return value;}
64 inline const char*
unboxing(
const string& value)
noexcept {
return value.c_str();}
65 inline const char*
unboxing(
string& value)
noexcept {
return value.c_str();}
67 template<
class char_t>
69 template<
class char_t>
73 inline const char*
unboxing<char>(
const string& value) {
return value.c_str();}
75 inline const char*
unboxing<char>(
string& value) {
return value.c_str();}
79 thread_local static std::u8string result;
81 return result.c_str();
85 thread_local static std::u8string result;
87 return result.c_str();
92 thread_local static std::u16string result;
94 return result.c_str();
98 thread_local static std::u16string result;
100 return result.c_str();
105 thread_local static std::u32string result;
107 return result.c_str();
111 thread_local static std::u32string result;
113 return result.c_str();
118 thread_local static std::wstring result;
120 return result.c_str();
124 thread_local static std::wstring result;
126 return result.c_str();
154 inline char unboxing(
const char& value)
noexcept {
return value;}
159 inline char unboxing(
char& value)
noexcept {
return value;}
184 inline float unboxing(
const float& value)
noexcept {
return value;}
185 inline double unboxing(
const double& value)
noexcept {
return value;}
187 inline float unboxing(
float& value)
noexcept {
return value;}
188 inline double unboxing(
double& value)
noexcept {
return value;}
Contains __xtd_std_version definitions.
Contains xtd::box struct.
Contains xtd::char16 type.
Contains xtd::char32 type.
Contains xtd::char8 type.
Contains xtd::char_ type.
static xtd::u16string to_u16string(const xtd::string &str) noexcept
Converts xtd::string to xtd::u16string.
static xtd::u8string to_u8string(const xtd::string &str) noexcept
Converts xtd::string to xtd::u8string.
static xtd::u32string to_u32string(const xtd::string &str) noexcept
Converts xtd::string to xtd::u32string.
static xtd::wstring to_wstring(const xtd::string &str) noexcept
Converts xtd::string to xtd::wstring.
static void throws(xtd::helpers::exception_case exception_case, const source_location &location=source_location::current())
Throws an exption with specified exception case.
Contains xtd::decimal type.
Contains xtd::double_ type.
@ invalid_cast
The cast is not valid.
Definition exception_case.hpp:61
type_t unboxing(const xtd::box< type_t > &value) noexcept
Allows to unbox an object.
Definition unboxing.hpp:48
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
Contains xtd::int16 type.
Contains xtd::int32 type.
Contains xtd::int64 type.
Contains xtd::intptr type.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::sbyte type.
Contains xtd::single type.
Represents a boxed object.
Definition box.hpp:57
Contains xtd::uint16 type.
Contains xtd::uint32 type.
Contains xtd::uint64 type.
Contains xtd::uintptr type.
Contains xtd::wchar type.