This struct template provides a type trait to determine if one class is an accessible base class of another class. Note that, while similar to std::is_base_of, when the derived relationship is via private, protected, or ambiguous inheritance IsAccessibleBaseOf evaluates to false.
Synopsis
Declared in <bslmf_isaccessiblebaseof.h>
template<
class t_BASE,
class t_DERIVED>
class IsAccessibleBaseOf
: public bsl::integral_constant<bool, bsl::is_class<typename bsl::remove_cv<t_BASE>::type>::value && bsl::is_class<typename bsl::remove_cv<t_DERIVED>::type>::value && bsl::is_convertible<typename bsl::remove_cv<t_DERIVED>::type *, typename bsl::remove_cv<t_BASE>::type *>::value>
Base Classes
Name |
Description |
Metafunction representing a compile‐time constant of the specified (template parameter) |
Type Aliases
Name |
Description |
Alias for this |
|
Member Functions
Name |
Description |
Return a copy of the template argument |
|