[PATCH] D132336: [ADT] Remove is_splat
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 21 13:07:04 PDT 2022
kuhar created this revision.
Herald added a reviewer: grosser.
Herald added a project: All.
kuhar requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`is_splat` is superseded by `all_equal` and marked as deprecated.
See the discussion thread for more details:
https://discourse.llvm.org/t/adt-is-splat-and-empty-ranges/64692
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132336
Files:
llvm/include/llvm/ADT/STLExtras.h
Index: llvm/include/llvm/ADT/STLExtras.h
===================================================================
--- llvm/include/llvm/ADT/STLExtras.h
+++ llvm/include/llvm/ADT/STLExtras.h
@@ -1786,24 +1786,6 @@
return all_equal<std::initializer_list<T>>(std::move(Values));
}
-/// Returns true if Range consists of the same value repeated multiple times.
-template <typename R>
-LLVM_DEPRECATED(
- "Use 'all_equal(Range)' or '!empty(Range) && all_equal(Range)' instead.",
- "all_equal")
-bool is_splat(R &&Range) {
- return !llvm::empty(Range) && all_equal(Range);
-}
-
-/// Returns true if Values consists of the same value repeated multiple times.
-template <typename T>
-LLVM_DEPRECATED(
- "Use 'all_equal(Values)' or '!empty(Values) && all_equal(Values)' instead.",
- "all_equal")
-bool is_splat(std::initializer_list<T> Values) {
- return is_splat<std::initializer_list<T>>(std::move(Values));
-}
-
/// Provide a container algorithm similar to C++ Library Fundamentals v2's
/// `erase_if` which is equivalent to:
///
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132336.454337.patch
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220821/ba55f9c0/attachment.bin>
More information about the llvm-commits
mailing list