From 334258e39e5f821f55a6dce805e81f1eb31f73ef Mon Sep 17 00:00:00 2001 From: DavidWongEA <46357167+davidwongea@users.noreply.github.com> Date: Thu, 17 Jan 2019 08:30:55 -0800 Subject: [PATCH] Potential fix for model inference crash on Win10 (#15919) (#16092) Summary: Please refer to issue #15919 Pull Request resolved: https://github.com/pytorch/pytorch/pull/16092 Differential Revision: D13712897 Pulled By: soumith fbshipit-source-id: edcd1ed3504f1fa1af841a1757616382c745958f --- torch/csrc/jit/stack.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/torch/csrc/jit/stack.h b/torch/csrc/jit/stack.h index e445691..8ff3d35 100644 --- a/torch/csrc/jit/stack.h +++ b/torch/csrc/jit/stack.h @@ -65,9 +65,7 @@ static inline void pop(Stack& stack, Types&... args) { } template static inline void push(Stack& stack, Types&&... args) { - constexpr size_t N = sizeof...(args); - int result[N] = {(stack.emplace_back(std::forward(args)), 0)...}; - (void)result; + std::initializer_list{(stack.emplace_back(std::forward(args)), 0)...}; } // The packer here is carefully written not to make any unnecessary -- 2.7.4