PYTORCH1.6 build hava error

BUILD PYTORCH1.6 VS2017 error :

Q: \ \ pytorch1.6 \ \ pytorchaa \ \ aten \ \ SRC \ \ aten / core / boxing / impl / boxing. H (101): error c2066: it is illegal to cast to a function type (compilation source file Q: \ \ pytorch1.6 \ \ pytorchaa\build\aten\src\ATen\BackendSelectRegister.cpp ) [Q:\pytorch1.6\pytorchaa\build\caffe2\torch_ cpu.vcxproj ]

CODE: boxing. h
template <class FuncType, class Enable = void>
struct BoxedKernelWrapper {
static_assert(
sizeof(FuncType) == -1,
"Function signature contains one or more unsupported parameter and/or return types. "
“Look for a nearby error like "
“”‘call’ is not a member of ‘c10::impl::BoxedKernelWrapper<(your function type), void>’” "
“- (your function type) is the unsupported signature.”);
};
sizeof(FuncType) is error

I had the same issue as you and resolve this by using Ninja instead of Visual Studio. Looks like somehow my C++ compiler for VS is corrupted.