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 fa5d05e commit 6ae68feCopy full SHA for 6ae68fe
include/pybind11/common.h
@@ -385,7 +385,10 @@ template <class T> using negation = bool_constant<!T::value>;
385
#endif
386
387
/// Compile-time all/any/none of that check the ::value of all template types
388
-#if !defined(_MSC_VER)
+#ifdef PYBIND11_CPP17
389
+template <class... Ts> using all_of = bool_constant<(Ts::value && ...)>;
390
+template <class... Ts> using any_of = bool_constant<(Ts::value || ...)>;
391
+#elif !defined(_MSC_VER)
392
template <bool...> struct bools {};
393
template <class... Ts> using all_of = std::is_same<
394
bools<Ts::value..., true>,
0 commit comments