pytorch
e49ea871 - Fix socket.cpp compilation using gcc-9.4 (#111002)

Commit
1 year ago
Fix socket.cpp compilation using gcc-9.4 (#111002) Otherwise following error is thrown when attempted to compile with WERROR enabled: ``` In file included from /home/nshulga/git/pytorch/pytorch/torch/csrc/distributed/c10d/socket.cpp:30: /home/nshulga/git/pytorch/pytorch/third_party/fmt/include/fmt/chrono.h:340:24: warning: redundant redeclaration of ‘constexpr’ static data member ‘fmt::v10::detail::codecvt_result<CodeUnit>::max_size’ [-Wdeprecated] 340 | constexpr const size_t codecvt_result<CodeUnit>::max_size; | ^~~~~~~~~~~~~~~~~~~~~~~~ /home/nshulga/git/pytorch/pytorch/third_party/fmt/include/fmt/chrono.h:335:33: note: previous declaration of ‘fmt::v10::detail::codecvt_result<CodeUnit>::max_size’ 335 | static constexpr const size_t max_size = 32; | ^~~~~~~~ ``` or following if using clang as host compiler ``` In file included from /Users/nshulga/git/pytorch/pytorch/torch/csrc/distributed/c10d/socket.cpp:30: /Users/nshulga/git/pytorch/pytorch/third_party/fmt/include/fmt/chrono.h:340:50: warning: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Wdeprecated] constexpr const size_t codecvt_result<CodeUnit>::max_size; ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/111002 Approved by: https://github.com/drisspg
Author
Committer
Parents
Loading