summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/experimental/type_traits29
-rw-r--r--libstdc++-v3/include/std/type_traits20
2 files changed, 49 insertions, 0 deletions
diff --git a/libstdc++-v3/include/experimental/type_traits b/libstdc++-v3/include/experimental/type_traits
index b0ed3b0fa66..e4f3ffef004 100644
--- a/libstdc++-v3/include/experimental/type_traits
+++ b/libstdc++-v3/include/experimental/type_traits
@@ -271,6 +271,35 @@ template<typename _To, template<typename...> class _Op, typename... _Args>
constexpr bool is_detected_convertible_v
= is_detected_convertible<_To, _Op, _Args...>::value;
+#define __cpp_lib_experimental_logical_traits 201511
+
+template<typename... _Bn>
+ struct conjunction
+ : __and_<_Bn...>
+ { };
+
+template<typename... _Bn>
+ struct disjunction
+ : __or_<_Bn...>
+ { };
+
+template<typename _Pp>
+ struct negation
+ : __not_<_Pp>
+ { };
+
+template<typename... _Bn>
+ constexpr bool conjunction_v
+ = conjunction<_Bn...>::value;
+
+template<typename... _Bn>
+ constexpr bool disjunction_v
+ = disjunction<_Bn...>::value;
+
+template<typename _Pp>
+ constexpr bool negation_v
+ = negation<_Pp>::value;
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace fundamentals_v2
} // namespace experimental
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 7448d5b836f..e5102def906 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -154,6 +154,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public integral_constant<bool, !_Pp::value>
{ };
+#if __cplusplus > 201402L
+
+#define __cpp_lib_logical_traits 201511
+
+ template<typename... _Bn>
+ struct conjunction
+ : __and_<_Bn...>
+ { };
+
+ template<typename... _Bn>
+ struct disjunction
+ : __or_<_Bn...>
+ { };
+
+ template<typename _Pp>
+ struct negation
+ : __not_<_Pp>
+ { };
+#endif
+
// For several sfinae-friendly trait implementations we transport both the
// result information (as the member type) and the failure information (no
// member type). This is very similar to std::enable_if, but we cannot use