5#if !defined(__XTD_CORE_INTERNAL__) 
    6#error "Do not include this file: Internal use only" 
   12  template<
typename type_t, 
typename bool_t>
 
   15  template<
typename type_t>
 
   17    type_t operator()(
const any_object& 
o)
 const {
return as<enum_object<type_t>>(
o.value());}
 
   20  template<
typename type_t>
 
   25  template<
typename type_t, 
typename bool_t>
 
   28  template<
typename type_t>
 
   30    type_t operator()(
const any_object& 
o)
 const {
return as<type_t>(
o.value());}
 
   33  template<
typename type_t>
 
   56  template<
typename type_t>
 
   58    if (
is<
box<type_t>>(
o.value())) 
return as<box<type_t>>(
o.value()).value();
 
   62  template<
typename type_t>
 
   63  type_t 
as(
const any_object& 
o) {
 
   64    if (
is<box<type_t>>(
o.value())) 
return as<box<type_t>>(
o.value()).value();
 
   65    return __polymorphic_any_object__<type_t, typename std::is_polymorphic<type_t>::type> {}(
o);
 
Represent a polymorphic wrapper capable of holding any type.
Definition any_object.hpp:28
 
Represents a boxed object.
Definition box.hpp:53
 
The exception that is thrown for invalid casting or explicit conversion.
Definition invalid_cast_exception.hpp:19
 
bool is(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:365
 
type_t as(any_object &o)
Casts a type into another type.
Definition __as_any_object.hpp:57
 
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
 
Definition __as_any_object.hpp:13
 
Definition __as_any_object.hpp:26