1 Şubat 2021 Pazartesi

std::is_derived_from

Giriş
Açıklaması şöyle
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 behaviour is different to std::is_base_of when Base is a private or protected base of Derived.
Örnek - std::is_derived_from
Şöyle yaparız
template<std::is_derived_from<Draw_Shape> T>
class MyClass{
};

Hiç yorum yok:

Yorum Gönder