diff --git a/include/pybind11/common.h b/include/pybind11/common.h index 254fbadd..bfc5f133 100644 --- a/include/pybind11/common.h +++ b/include/pybind11/common.h @@ -385,7 +385,10 @@ template using negation = bool_constant; #endif /// Compile-time all/any/none of that check the ::value of all template types -#if !defined(_MSC_VER) +#ifdef PYBIND11_CPP17 +template using all_of = bool_constant<(Ts::value && ...)>; +template using any_of = bool_constant<(Ts::value || ...)>; +#elif !defined(_MSC_VER) template struct bools {}; template using all_of = std::is_same< bools,