# std::DerivedFrom

From cppreference.com
< cpp‎ | concepts

Defined in header `<concepts>` |  |
template< class Derived, class Base > concept DerivedFrom = std::is_base_of_v <Base, Derived> && std::is_convertible_v <const volatile Derived*, const volatile Base*>; |  | (since C++20)

The concept DerivedFrom <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 behaviour is different to `std::is_base_of` when `Base` is a private or protected base of `Derived`.

### See also

is_base_of (C++11) | checks if a type is derived from the other type (class template)
is_convertibleis_nothrow_convertible (C++11)(C++20) | checks if a type can be converted to the other type (class template)

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/concepts/DerivedFrom&oldid=106261"