Skip to content

Commit 20573d1

Browse files
committed
[ADT] Remove is_splat
`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 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D132336
1 parent 940704c commit 20573d1

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

llvm/include/llvm/ADT/STLExtras.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,24 +1791,6 @@ template <typename T> bool all_equal(std::initializer_list<T> Values) {
17911791
return all_equal<std::initializer_list<T>>(std::move(Values));
17921792
}
17931793

1794-
/// Returns true if Range consists of the same value repeated multiple times.
1795-
template <typename R>
1796-
LLVM_DEPRECATED(
1797-
"Use 'all_equal(Range)' or '!empty(Range) && all_equal(Range)' instead.",
1798-
"all_equal")
1799-
bool is_splat(R &&Range) {
1800-
return !llvm::empty(Range) && all_equal(Range);
1801-
}
1802-
1803-
/// Returns true if Values consists of the same value repeated multiple times.
1804-
template <typename T>
1805-
LLVM_DEPRECATED(
1806-
"Use 'all_equal(Values)' or '!empty(Values) && all_equal(Values)' instead.",
1807-
"all_equal")
1808-
bool is_splat(std::initializer_list<T> Values) {
1809-
return is_splat<std::initializer_list<T>>(std::move(Values));
1810-
}
1811-
18121794
/// Provide a container algorithm similar to C++ Library Fundamentals v2's
18131795
/// `erase_if` which is equivalent to:
18141796
///

0 commit comments

Comments
 (0)