Skip to content

Commit

Permalink
fix to_span in RegexMatchCacheTest
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Feb 10, 2025
1 parent ee60b26 commit 4161177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/container/test/RegexMatchCacheTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct unordered_vector_set : private unordered_vector_set_base<T> {
}
static folly::span<T const> to_span(
folly::sorted_vector_set<T> const& set) noexcept {
return {set.begin(), set.end()};
return {&*set.begin(), &*set.end()};
}
folly::span<T const> to_span() const noexcept { return to_span(*this); }

Expand Down

0 comments on commit 4161177

Please sign in to comment.