This is an automated email from the ASF dual-hosted git repository. bneradt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git
commit dbb8e73e565e6bb775ad04d60d8fe1b67a1c4479 Author: Mo Chen <[email protected]> AuthorDate: Tue Sep 17 10:00:38 2024 -0500 Fix libswoc compile with clang 20 (#11771) - Fix incorrect method name has_intersection (should be has_intersection_with). - template keyword on a method call causes a warning if template arguments are not supplied. --- code/include/swoc/DiscreteRange.h | 6 +++--- code/include/swoc/Vectray.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/include/swoc/DiscreteRange.h b/code/include/swoc/DiscreteRange.h index cfd8dba..7becebf 100644 --- a/code/include/swoc/DiscreteRange.h +++ b/code/include/swoc/DiscreteRange.h @@ -464,7 +464,7 @@ template <typename T> auto DiscreteRange<T>::relationship(self_type const &that) const -> Relation { Relation retval = Relation::NONE; - if (this->has_intersection(that)) { + if (this->has_intersection_with(that)) { if (*this == that) retval = Relation::EQUAL; else if (this->is_subset_of(that)) @@ -568,7 +568,7 @@ DiscreteRange<T>::max() const { template <typename T> bool DiscreteRange<T>::has_union(DiscreteRange::self_type const &that) const { - return this->has_intersection(that) || this->is_adjacent_to(that); + return this->has_intersection_with(that) || this->is_adjacent_to(that); } template <typename T> @@ -644,7 +644,7 @@ operator!=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) { template <typename T> bool operator^(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) { - return lhs.has_intersection(rhs); + return lhs.has_intersection_with(rhs); } /** Containment ordering. diff --git a/code/include/swoc/Vectray.h b/code/include/swoc/Vectray.h index eb53705..5ebb0bd 100644 --- a/code/include/swoc/Vectray.h +++ b/code/include/swoc/Vectray.h @@ -248,7 +248,7 @@ template <typename T, size_t N, class A> template <size_t M> Vectray<T, N, A>::V if (span.size() > N) { } else { for (auto &&item : span) { - this->template emplace_back(std::move(item)); + this->template emplace_back<T, N, A>(std::move(item)); } } } @@ -287,7 +287,7 @@ Vectray<T, N, A>::operator[](size_type idx) { template <typename T, size_t N, typename A> T const & Vectray<T, N, A>::operator[](size_type idx) const { - return this->items[idx]; + return this->items()[idx]; } template <typename T, size_t N, typename A>
