16 template<
typename value_t>
17 inline bool is(
bool value) {
return false;}
18 template<
typename value_t>
19 inline bool is(
decimal value) {
return false;}
20 template<
typename value_t>
21 inline bool is(
double value) {
return false;}
22 template<
typename value_t>
23 inline bool is(
float value) {
return false;}
24 template<
typename value_t>
25 inline bool is(
sbyte value) {
return false;}
26 template<
typename value_t>
27 inline bool is(
int16 value) {
return false;}
28 template<
typename value_t>
29 inline bool is(
int32 value) {
return false;}
30 template<
typename value_t>
31 inline bool is(
int64 value) {
return false;}
32 template<
typename value_t>
33 inline bool is(
slong value) {
return false;}
34 template<
typename value_t>
36 template<
typename value_t>
37 inline bool is(
uint16 value) {
return false;}
38 template<
typename value_t>
39 inline bool is(
uint32 value) {
return false;}
40 template<
typename value_t>
41 inline bool is(
uint64 value) {
return false;}
42 template<
typename value_t>
334 template<
typename type_t>
335 bool is(std::any value) {
337 std::any_cast<type_t>(value);
339 }
catch (
const std::bad_cast&) {
365 template<
typename type_t,
typename param_t>
366 bool is(
const param_t* value) {
368 if (value ==
nullptr)
return false;
369 return dynamic_cast<const type_t*
>(value) !=
nullptr;
370 }
catch (
const std::bad_cast&) {
383 template<
typename type_t,
typename param_t>
384 bool is(
const param_t& value) {
385 return is<type_t>(&value);
396 template<
typename type_t,
typename param_t>
397 bool is(param_t* value) {
399 if (value ==
nullptr)
return false;
400 return dynamic_cast<type_t*
>(value) !=
nullptr;
401 }
catch (
const std::bad_cast&) {
414 template<
typename type_t,
typename param_t>
415 bool is(param_t& value) {
416 return is<type_t>(&value);
427 template<
typename new_type_t,
typename current_type_t>
428 bool is(std::shared_ptr<current_type_t>& value) {
429 auto result = std::dynamic_pointer_cast<new_type_t>(value);
430 if (result)
return true;
Contains std::any type and std::bad_any_cast exception.
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
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition types.h:274
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition types.h:175
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
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
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
bool is< float >(float value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:122
bool is< slong >(slong value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:222
bool is< xtd::ulong >(xtd::ulong value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:322
bool is< sbyte >(sbyte value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:142
bool is(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:335
bool is< decimal >(decimal value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:82
bool is< int64 >(int64 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:202
bool is< uint64 >(uint64 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:302
bool is< double >(double value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:102
bool is< uint16 >(uint16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:262
bool is< bool >(bool value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:62
bool is< uint32 >(uint32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:282
bool is< std::any >(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:353
bool is< int32 >(int32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:182
bool is< int16 >(int16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:162
bool is< xtd::byte >(xtd::byte value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:242
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::parse methods.
Contains xtd fundamental types.
Contains unused_ keyword.