#include <xtd/as>
#include <xtd/console>
#include <xtd/convert>
#include <xtd/convert_pointer>
#include <xtd/random>
auto main() -> int {
console::write_line(
"p = {0}, convert_pointer::to_ptr<string>(p) = {1}, as<string>(p) = {2}", *
p, *p1, *p2);
try {
}
try {
}
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static int32 to_int32(std::any value)
Convert std::any to int32.
static string to_string(std::any value)
Convert std::any to string.
The exception that is thrown for invalid casting or explicit conversion.
Definition invalid_cast_exception.hpp:19
Represents a pseudo-random number generator, a device that produces a sequence of numbers that meet c...
Definition random.hpp:43
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
static const new_type_t * to_ptr(const current_type_t *value)
Casts a type into another type.
Definition convert_pointer.hpp:46
ptr< type_t > new_ptr(args_t &&... args)
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
type_t as(any_object &o)
Casts a type into another type.
Definition __as_any_object.hpp:59
@ a
The A key.
Definition console_key.hpp:88
@ d
The D key.
Definition console_key.hpp:94
@ p
The P key.
Definition console_key.hpp:118
@ i
The I key.
Definition console_key.hpp:104
@ e
The E key.
Definition console_key.hpp:96
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8