|
|
@ -23,10 +23,12 @@ concept IsSTLContainer = requires(T t) {
|
|
|
|
t.size();
|
|
|
|
t.size();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Check if type T is derived from T2
|
|
|
|
// TODO: Replace with std::derived_from when the <concepts> header
|
|
|
|
template <typename T, typename T2>
|
|
|
|
// is available on all supported platforms.
|
|
|
|
concept IsBaseOf = requires {
|
|
|
|
template <typename Derived, typename Base>
|
|
|
|
std::is_base_of_v<T, T2>;
|
|
|
|
concept DerivedFrom = requires {
|
|
|
|
|
|
|
|
std::is_base_of_v<Base, Derived>;
|
|
|
|
|
|
|
|
std::is_convertible_v<const volatile Derived*, const volatile Base*>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Common
|
|
|
|
} // namespace Common
|
|
|
|