pytorch/c10
Bin Bao dd1b6621bc Remove C10_DEPRECATED references in c10 (#151058)
Summary:
Revive https://github.com/pytorch/pytorch/pull/138406.  Only limit the scope to files in c10.

Summary from the original PR,
```
Looking in the code I see

// NB: __cplusplus doesn't work for MSVC, so for now MSVC always uses
// the "__declspec(deprecated)" implementation and not the C++14
// "[[deprecated]]" attribute. We tried enabling "[[deprecated]]" for C++14 on
// MSVC, but ran into issues with some older MSVC versions.
But looking at the MSVC C++ support table I see that the [[deprecated]] attribute is supported as of MSVC 2015 and that the vast majority of C++17 features became supported in MSVC 2015 or later.

Since PyTorch is C++17 now, I infer that PyTorch must not support versions of MSVC earlier than MSVC 2015, so the versions of MSVC supported by PyTorch must support [[deprecated]].

Therefore, since we are finished deprecating old MSVCs we can deprecate C10_DEPRECATED.
```

Test Plan: CI

Differential Revision: D72762767

Pull Request resolved: https://github.com/pytorch/pytorch/pull/151058
Approved by: https://github.com/r-barnes
2025-06-12 13:38:03 +00:00
..
benchmark Set RUNPATH so installed tests can find the required shared libraries (#136627) 2024-10-25 09:38:08 +00:00
core Remove C10_DEPRECATED references in c10 (#151058) 2025-06-12 13:38:03 +00:00
cuda pass mempool arg through emptyCache (#155315) 2025-06-06 16:14:26 +00:00
hip Use torch_compile_options for c10 libraries (#147821) 2025-03-18 01:54:23 +00:00
macros Move c10/macros/Export.h to torch/standalone (#154850) 2025-06-03 06:18:59 +00:00
metal [MPS] Fix binary builds (#155733) 2025-06-11 22:55:33 +00:00
mobile [2/N] Fix extra warnings brought by clang-tidy-17 (#137459) 2024-10-08 19:05:02 +00:00
test [nativert] port semaphore to c10 util (#153504) 2025-05-28 19:17:30 +00:00
util Remove C10_DEPRECATED references in c10 (#151058) 2025-06-12 13:38:03 +00:00
xpu Keep XPU compatible with toolchain 2025.2 (#154359) 2025-05-29 11:12:07 +00:00
BUCK.oss [nativert] port semaphore to c10 util (#153504) 2025-05-28 19:17:30 +00:00
BUILD.bazel remove //c10:headers (#98420) 2023-04-05 19:33:10 +00:00
build.bzl Use c10 version of half/bfloat16 in executorch (#144111) 2025-02-08 22:40:14 +00:00
CMakeLists.txt Revert "Use 3.27 as the minimum CMake version (#153153)" 2025-05-31 02:14:24 +00:00
ovrsource_defs.bzl Move c10/macros/Export.h to torch/standalone (#154850) 2025-06-03 06:18:59 +00:00