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>
364 template<
typename type_t>
365 bool is(std::any value) {
367 std::any_cast<type_t>(value);
369 }
catch (
const std::bad_cast&) {
399 template<
typename type_t,
typename param_t>
400 bool is(
const param_t* value) {
402 if (value ==
nullptr)
return false;
403 return dynamic_cast<const type_t*
>(value) !=
nullptr;
404 }
catch (
const std::bad_cast&) {
419 template<
typename type_t,
typename param_t>
420 bool is(
const param_t& value) {
421 return is<type_t>(&value);
434 template<
typename type_t,
typename param_t>
435 bool is(param_t* value) {
437 if (value ==
nullptr)
return false;
438 return dynamic_cast<type_t*
>(value) !=
nullptr;
439 }
catch (
const std::bad_cast&) {
454 template<
typename type_t,
typename param_t>
455 bool is(param_t& value) {
456 return is<type_t>(&value);
469 template<
typename new_type_t,
typename current_type_t>
471 auto result = std::dynamic_pointer_cast<new_type_t>(value);
472 if (result)
return true;
Contains std::any type and std::bad_any_cast exception.
int16_t int16
Represents a 16-bit signed integer.
Definition int16.h:23
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.h:23
int64_t int64
Represents a 64-bit signed integer.
Definition int64.h:23
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.h:27
int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.h:23
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.h:23
uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.h:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.h:23
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.h:27
bool is< float >(float value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:130
bool is< slong >(slong value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:240
bool is< xtd::ulong >(xtd::ulong value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:350
bool is< sbyte >(sbyte value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:152
bool is(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:365
bool is< decimal >(decimal value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:86
bool is< int64 >(int64 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:218
bool is< uint64 >(uint64 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:328
bool is< double >(double value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:108
bool is< uint16 >(uint16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:284
bool is< bool >(bool value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:64
bool is< uint32 >(uint32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:306
bool is< std::any >(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:385
bool is< int32 >(int32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:196
bool is< int16 >(int16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:174
bool is< xtd::byte >(xtd::byte value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:262
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.