pytorch
a268b9e5 - Fix yet another C++17 Windows build issue (#90228)

Commit
1 year ago
Fix yet another C++17 Windows build issue (#90228) Not sure why, but top-level `using namespace` directive causes VC++ fail with (if C++17 standard is used, but everything is fine with C++14): ``` C:\actions-runner\_work\pytorch\pytorch\third_party\pybind11\include\pybind11\detail\../pytypes.h(1520): error C2872: 'attr': ambiguous symbol C:\actions-runner\_work\pytorch\pytorch\aten\src\ATen/core/interned_strings.h(349): note: could be 'c10::attr' C:\actions-runner\_work\pytorch\pytorch\torch/csrc/jit/ir/ir.h(75): note: or 'torch::jit::attr' C:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\pybind11\include\pybind11/pybind11.h(1094): note: see reference to function template instantiation 'pybind11::str pybind11::str::format<_Ty1&>(_Ty1 &) const' being compiled with [ _Ty1=pybind11::handle ] ``` Solve this by replacing global `using namespace torch::jit;` with specific usages of objects/methods from namespaces Another prep change for https://github.com/pytorch/pytorch/70188 Pull Request resolved: https://github.com/pytorch/pytorch/pull/90228 Approved by: https://github.com/kit1980, https://github.com/albanD
Author
Committer
Parents
Loading