From 416117791bafe62f0f01cbe71b24149e5ca10050 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Mon, 10 Feb 2025 08:00:29 -0800 Subject: [PATCH] fix to_span in RegexMatchCacheTest Summary: There is no guarantee that a vector-set iterator type will be a pointer. So we have to get the pointers explicitly to construct a `span`. Reviewed By: ilvokhin Differential Revision: D69339286 fbshipit-source-id: cc87ea9fe70e2a88c10f5177b58267b8b9fd2bc0 --- folly/container/test/RegexMatchCacheTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/container/test/RegexMatchCacheTest.cpp b/folly/container/test/RegexMatchCacheTest.cpp index eefa266ebdb..484476ab43c 100644 --- a/folly/container/test/RegexMatchCacheTest.cpp +++ b/folly/container/test/RegexMatchCacheTest.cpp @@ -106,7 +106,7 @@ struct unordered_vector_set : private unordered_vector_set_base { } static folly::span to_span( folly::sorted_vector_set const& set) noexcept { - return {set.begin(), set.end()}; + return {&*set.begin(), &*set.end()}; } folly::span to_span() const noexcept { return to_span(*this); }