27#define __XTD_CORE_INTERNAL__
28#include "internal/__box_enum_or_object.h"
29#undef __XTD_CORE_INTERNAL__
45 template<
typename type_t>
46 inline auto boxing(
const type_t& value)
noexcept {
return typename __box_enum_or_object__<type_t, typename std::is_enum<type_t>::type>
::type(value);}
59 template<
typename type_t,
typename ...args_t>
63 inline const object&
boxing(
const object& value)
noexcept {
return value;}
64 inline ustring
boxing(
const char* value)
noexcept {
return ustring(value);}
65#if defined(__cpp_lib_char8_t)
66 inline ustring
boxing(
const char8* value)
noexcept {
return ustring(value);}
68 inline ustring
boxing(
const char16* value)
noexcept {
return ustring(value);}
69 inline ustring
boxing(
const char32* value)
noexcept {
return ustring(value);}
70 inline ustring
boxing(
const wchar* value)
noexcept {
return ustring(value);}
72#if defined(__cpp_lib_char8_t)
79#if defined(__cpp_lib_char8_t)
Contains xtd::byte type and xtd::byte_object alias.
Contains xtd::char16 type and xtd::char16_object alias.
Contains xtd::char32 type and xtd::char32_object alias.
Contains xtd::char8 type and xtd::char8_object alias.
Contains xtd::char type and xtd::char_object alias.
Represents a boxed object.
Definition box.h:47
Contains xtd::decimal type and xtd::decimal_object alias.
Contains xtd::double type and xtd::double_object alias.
auto boxing(const type_t &value) noexcept
Allows to box an object.
Definition boxing.h:46
char8_t char8
Represents a 8-bit unicode character.
Definition types.h:64
wchar_t wchar
Represents a wide character.
Definition types.h:286
int_least16_t int16
Represents a 16-bit signed integer.
Definition types.h:120
long double decimal
Represents a decimal-precision floating-point number.
Definition types.h:98
box_floating_point< decimal > decimal_object
Represent a boxed decimal.
Definition decimal_object.h:30
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition types.h:274
char16_t char16
Represents a 16-bit unicode character.
Definition types.h:76
box_char< char32 > char32_object
Represent a boxed char32.
Definition char32_object.h:30
box_char< char16 > char16_object
Represent a boxed char16.
Definition char16_object.h:30
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition types.h:175
box_integer< slong > slong_object
Represent a boxed int16.
Definition slong_object.h:28
box_integer< int16 > int16_object
Represent a boxed int16.
Definition int16_object.h:28
box_integer< int32 > int32_object
Represent a boxed int32.
Definition int32_object.h:28
box_integer< uint16 > uint16_object
Represent a boxed uint16.
Definition uint16_object.h:28
box_char< char8 > char8_object
Represent a boxed char8.
Definition char8_object.h:31
int_least64_t int64
Represents a 64-bit signed integer.
Definition types.h:142
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition types.h:230
box_floating_point< float > single_object
Represent a boxed single.
Definition single_object.h:28
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
box_integer< sbyte > sbyte_object
Represent a boxed sbyte.
Definition sbyte_object.h:28
box_integer< xtd::byte > byte_object
Represent a boxed byte.
Definition byte_object.h:30
char32_t char32
Represents a 32-bit unicode character.
Definition types.h:87
box_floating_point< double > double_object
Represent a boxed double.
Definition double_object.h:30
box_char< char > char_object
Represent a boxed char.
Definition char_object.h:30
box_char< wchar > wchar_object
Represent a boxed wchar.
Definition wchar_object.h:30
box_integer< uint64 > uint64_object
Represent a boxed uint64.
Definition uint64_object.h:28
box_integer< int64 > int64_object
Represent a boxed int64.
Definition int64_object.h:28
box_integer< uint32 > uint32_object
Represent a boxed uint32.
Definition uint32_object.h:28
box_integer< ulong > ulong_object
Represent a boxed ulong.
Definition ulong_object.h:28
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition types.h:252
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition types.h:241
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition types.h:208
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition types.h:41
std::type_info type
Stores information about a type.
Definition types.h:219
Contains xtd::int16 type and xtd::int16_object alias.
Contains xtd::int32 type and xtd::int32_object alias.
Contains xtd::int64 type and xtd::int64_object alias.
Contains xtd::intptr type and xtd::intptr_object alias.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::sbyte type and xtd::sbyte_object alias.
Contains xtd::single type and xtd::single_object alias.
Contains xtd::slong type and xtd::slong_object alias.
Contains xtd::uint16 type and xtd::uint16_object alias.
Contains xtd::uint32 type and xtd::uint32_object alias.
Contains xtd::uint64 type and xtd::uint64_object alias.
Contains xtd::uintptr type and xtd::uintptr_object alias.
Contains xtd::ulong type and xtd::ulong_object alias.
Contains xtd::wchar type and xtd::wchar_object alias.
Contains xtd::drawing::size class.