We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc26209 commit 7e0d3ebCopy full SHA for 7e0d3eb
include/pybind11/common.h
@@ -374,7 +374,10 @@ template <class T> using negation = bool_constant<!T::value>;
374
#endif
375
376
/// Compile-time all/any/none of that check the ::value of all template types
377
-#if !defined(_MSC_VER)
+#ifdef PYBIND11_CPP17
378
+template <class... Ts> using all_of = bool_constant<(Ts::value && ...)>;
379
+template <class... Ts> using any_of = bool_constant<(Ts::value || ...)>;
380
+#elif !defined(_MSC_VER)
381
template <bool...> struct bools {};
382
template <class... Ts> using all_of = std::is_same<
383
bools<Ts::value..., true>,
0 commit comments