VCCC  2024.05
VisualCamp Common C++ library
derived_from

specifies that a type is derived from another type More...

Detailed Description

template<typename Derived, typename Base>
struct derived_from
: conjunction<
std::is_base_of<Base, Derived>,
std::is_convertible<const volatile Derived*, const volatile Base*>
> {};

The concept derived_from<Derived, Base> is satisfied if and only if Base is a class type that is either Derived or a public and unambiguous base of Derived, ignoring cv-qualifiers.

Note that this behavior is different to std::is_base_of when Base is a private or protected base of Derived.

Classes

struct  derived_from< Derived, Base >
 Models std::derived_from More...