xtd 0.2.0
Loading...
Searching...
No Matches

◆ is< decimal >()

template<>
bool xtd::is< decimal > ( decimal  value)
inline

Checks if the result of an expression is compatible with a given type.

Header
#include <xtd/is>
Namespace
xtd
Library
xtd.core
Examples
auto main() -> int {
decimal d = 4.2;
std::cout << "d " << is<decimal>(d) ? "is" : "isn't" << " decimal" << endl;
}
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.h:23
bool is< decimal >(decimal value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:86
@ d
The D key.