Added usefull staff to typetraits.h.
@@ -27,6 +27,17 @@ namespace NPrivate {
struct TUserTypeTrait {
static constexpr ui64 TypeTraitFlags = 0;
};
+
+ template <class... Bs>
+ constexpr bool Conjunction() {
+ bool bs[] = { Bs::value... };
+ for (auto b : bs) {
+ if (!b) {
+ return false;
+ }
+ }
+ return true;
+ };
}
template <class T>
@@ -269,6 +280,12 @@ template <class B>
struct TNegation : std::integral_constant<bool, !bool(B::value)> {
};
+//NOTE: to be replaced with std::conjunction in c++17
+template <class... Bs>
+struct TConjunction;
+template <class... Bs>
+struct TConjunction : std::integral_constant<bool, NPrivate::Conjunction<Bs...>()> {};
+
template <class T>
struct TIsPointerToConstMemberFunction : std::false_type {
};
