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

◆ as() [48/52]

template<typename new_type_t , typename current_type_t >
xtd::uptr< new_type_t > xtd::as ( xtd::uptr< current_type_t > &  value)

Casts a type into another type.

Header
#include <xtd/as>
Namespace
xtd
Library
xtd.core
Examples
xtd::uptr<button> value = xtd::new_uptr<xtd::forms::button>();
xtd::uptr<control> result = as<xtd::forms::control>(value);
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.h:25
Exceptions
xtd::invalid_cast_exceptionthe parameters is bad cast.