Skip to content

Commit 0ca6867

Browse files
bstaleticwjakob
authored andcommitted
Avoid Visual Studio 2017 15.9.4 ICE
1 parent f4b4e2e commit 0ca6867

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/pybind11/numpy.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,10 @@ struct vectorize_helper {
14661466
private:
14671467
remove_reference_t<Func> f;
14681468

1469-
template <size_t Index> using param_n_t = typename pack_element<Index, typename vectorize_arg<Args>::call_type...>::type;
1469+
// Internal compiler error in MSVC 19.16.27025.1 (Visual Studio 2017 15.9.4), when compiling with "/permissive-" flag
1470+
// when arg_call_types is manually inlined.
1471+
using arg_call_types = std::tuple<typename vectorize_arg<Args>::call_type...>;
1472+
template <size_t Index> using param_n_t = typename std::tuple_element<Index, arg_call_types>::type;
14701473

14711474
// Runs a vectorized function given arguments tuple and three index sequences:
14721475
// - Index is the full set of 0 ... (N-1) argument indices;

0 commit comments

Comments
 (0)