boost::openmethod::policies::RttiFn::is_polymorphic
Tests if the policy can find the class of an object at run time.
Synopsis
Declared in <boost/openmethod/preamble.hpp>
template<class Class>
static
bool const is_polymorphic;
Description
true if Class is polymorphic in the sense of the policy: given a reference to a Class, dynamic_type finds the class of the object it refers to. This need not match the C++ notion of a polymorphic class. When it is true:
-
virtual_<Class&>is a valid parameter type. A class that carries its own v‐table pointer, seeinplace_vptr_base, is valid either way. -
A
virtual_ptrcan be constructed from a reference, a pointer or a smart pointer to aClass. Otherwise,final_virtual_ptris the only way to make one. -
With runtime checks,
final_virtual_ptrverifies that the class of the object is exactlyClass.
The value is up to the policy, and must be a constant expression. std_rtti uses std::is_polymorphic_v<Class>; static_rtti deems no class polymorphic.
|
When this is |
Template Parameters
Name |
Description |
Class |
A class. |
Created with MrDocs