diff options
author | Zeming Lin <ebetica0@gmail.com> | 2018-04-18 02:38:47 -0400 |
---|---|---|
committer | Adam Paszke <adam.paszke@gmail.com> | 2018-04-18 08:38:47 +0200 |
commit | fb7bd8e4aebd857eb076adda32b851b1f83c4991 (patch) | |
tree | 2d3a0871ee9712ac7444a2b732882bfb75f93153 /aten | |
parent | 6223bfdb1d3273a57b58b2a04c25c6114eaf3911 (diff) | |
download | pytorch-fb7bd8e4aebd857eb076adda32b851b1f83c4991.tar.gz pytorch-fb7bd8e4aebd857eb076adda32b851b1f83c4991.tar.bz2 pytorch-fb7bd8e4aebd857eb076adda32b851b1f83c4991.zip |
Better dispatch (#6687)
Diffstat (limited to 'aten')
-rw-r--r-- | aten/src/ATen/templates/Tensor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aten/src/ATen/templates/Tensor.h b/aten/src/ATen/templates/Tensor.h index 4693cc5ef8..30c36aa19d 100644 --- a/aten/src/ATen/templates/Tensor.h +++ b/aten/src/ATen/templates/Tensor.h @@ -128,8 +128,8 @@ struct Tensor : public detail::TensorBase { ${tensor_method_declarations} template <typename F, typename... Args> - Tensor m(F func, Args&&... params) { - return func(*this, params...); + auto m(F func, Args&&... params) const -> decltype(func(*this, std::forward<Args>(params)...)) { + return func(*this, std::forward<Args>(params)...); } }; |