From 6c83bd8fd4ece56f84b0389692af6e8ddeb2937a Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Tue, 6 Dec 2022 23:02:58 +0100 Subject: [PATCH] AK: Introduce the `DerivedFrom` concept --- AK/Concepts.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AK/Concepts.h b/AK/Concepts.h index 6368310bfa..f3966a1e84 100644 --- a/AK/Concepts.h +++ b/AK/Concepts.h @@ -45,6 +45,9 @@ concept OneOfIgnoringCV = IsOneOfIgnoringCV; template typename S> concept SpecializationOf = IsSpecializationOf; +template +concept DerivedFrom = IsBaseOf; + template concept AnyString = IsConstructible; @@ -136,6 +139,7 @@ namespace AK { #endif using AK::Concepts::Arithmetic; using AK::Concepts::ArrayLike; +using AK::Concepts::DerivedFrom; using AK::Concepts::Enum; using AK::Concepts::FallibleFunction; using AK::Concepts::FloatingPoint;