[PATCH] D133502: [ADT] Mark `llvm::array_lengthof` as deprecated
Joe Loser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 09:23:56 PDT 2022
jloser updated this revision to Diff 458770.
jloser added a comment.
Use `LLVM_DEPRECATED` instead
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133502/new/
https://reviews.llvm.org/D133502
Files:
llvm/include/llvm/ADT/STLArrayExtras.h
Index: llvm/include/llvm/ADT/STLArrayExtras.h
===================================================================
--- llvm/include/llvm/ADT/STLArrayExtras.h
+++ llvm/include/llvm/ADT/STLArrayExtras.h
@@ -26,6 +26,7 @@
/// Find the length of an array.
template <class T, std::size_t N>
+LLVM_DEPRECATED("Use std::size instead.", "std::size")
constexpr inline size_t array_lengthof(T (&)[N]) {
return N;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133502.458770.patch
Type: text/x-patch
Size: 413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220908/fd126696/attachment.bin>
More information about the llvm-commits
mailing list