Can't build libtorch with error message "C2210 'T' : pack expansions cannot be used as arguments to non-packed parameters in alias templates"

Hi~
I followed the installing steps (https://pytorch.org/cppdocs/installing.html).
When I build the the project (example-app) in visual studio 2015, there was a error message “C2210 ‘T’ : pack expansions cannot be used as arguments to non-packed parameters in alias templates”.
Can someone help me?

I would recommend to try a newer Visual Studio. PyTorch does use pretty much all of C++11, so one would expect to need at least VS2017 or so.

Best regards

Thomas

Have you solved the problem yet

I think the answer here has been that VS2015 doesn’t cut the mustard and you need a newer VS to use with PyTorch. I’m afraid support isn’t going to expand to older version, if anything, you’ll need VS2019+ eventually. We keep a washlist of valid C++ idioms to avoid as is, we would not want to expand it more than necessary.

Best regards

Thomas

I had solved this problem by installing VS 2019.
Here is my configuration:
VS 2019
Pytorch: torch 1.4.0 +cuda9.2
Libtorch: nightly version 2019/12/02

Hey, I’m sorry to bump this old thread. However this “bug” still exists in VS2017. Updating to 2019 is not suitable for all of us, especially for people stuck in strict production environments. Is there any Idea how to go fix this?