Files
2025-10-25 03:02:53 +03:00

26 lines
920 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[concept.derived]
# 18 Concepts library [[concepts]](./#concepts)
## 18.4 Language-related concepts [[concepts.lang]](concepts.lang#concept.derived)
### 18.4.3 Concept derived_from [concept.derived]
[🔗](#concept:derived_from)
`template<class Derived, class Base>
concept [derived_from](#concept:derived_from "18.4.3Concept derived_­from[concept.derived]") =
is_base_of_v<Base, Derived> &&
is_convertible_v<const volatile Derived*, const volatile Base*>;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L326)
[*Note [1](#note-1)*:
[derived_from](#concept:derived_from "18.4.3Concept derived_­from[concept.derived]")<Derived, Base> is satisfied if and only ifDerived is publicly and unambiguously derived from Base, orDerived and Base are the same class type ignoring cv-qualifiers[.](#1.sentence-1)
— *end note*]