More constraints added for Dimension and Unit concepts

This commit is contained in:
Mateusz Pusz committed 2018-11-15 05:27:16 +01:00
1 parent e866985668
commit db64a3e6a1
3 files changed
+13 -2

No files matched your search

+5
View File
@@ -39,5 +39,10 @@ namespace mp {
static_cast<To>(f());
};
template<class Derived, class Base>
concept bool DerivedFrom =
std::is_base_of_v<Base, Derived> &&
std::is_convertible_v<const volatile Derived*, const volatile Base*>;
} // namespace std_concepts
} // namespace mp