#include <xtd/as>
#include <xtd/console>
#include <xtd/convert>
#include <any>
auto main() -> int {
auto value = 42;
auto float_value = 42.5f;
auto any_value = std::make_any<byte>(42);
auto string_value = "42";
auto string_hex_value = "0x2A";
auto overflow_value = 257;
console::write_line(
"static_cast<byte>(overflow_value) = {}",
static_cast<byte>(overflow_value));
try {
}
try {
}
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static xtd::byte to_byte(xtd::any value)
Convert xtd::any to byte.
The exception that is thrown when an arithmetic, casting, or conversion operation in a checked contex...
Definition overflow_exception.hpp:18
type_t as(any_object &o)
Casts a type into another type.
Definition __as_any_object.hpp:59
value_t parse(const std::string &str)
Convert a string into a type.
Definition parse.hpp:34
@ hex_number
Indicates that the allow_leading_white, allow_trailing_white, and allow_hex_specifier styles are used...
Definition number_styles.hpp:54
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8