diff --git a/folly/algorithm/simd/Contains.cpp b/folly/algorithm/simd/Contains.cpp index d5654714764..986a035b2e6 100644 --- a/folly/algorithm/simd/Contains.cpp +++ b/folly/algorithm/simd/Contains.cpp @@ -22,20 +22,21 @@ namespace folly::simd::detail { -bool containsU8(folly::span haystack, std::uint8_t needle) { +bool containsU8( + folly::span haystack, std::uint8_t needle) noexcept { return containsImpl(haystack, needle); } bool containsU16( - folly::span haystack, std::uint16_t needle) { + folly::span haystack, std::uint16_t needle) noexcept { return containsImpl(haystack, needle); } bool containsU32( - folly::span haystack, std::uint32_t needle) { + folly::span haystack, std::uint32_t needle) noexcept { return containsImpl(haystack, needle); } bool containsU64( - folly::span haystack, std::uint64_t needle) { + folly::span haystack, std::uint64_t needle) noexcept { return containsImpl(haystack, needle); } diff --git a/folly/algorithm/simd/Contains.h b/folly/algorithm/simd/Contains.h index 41117901e96..6a42a31e607 100644 --- a/folly/algorithm/simd/Contains.h +++ b/folly/algorithm/simd/Contains.h @@ -26,13 +26,14 @@ namespace detail { // no overloading for easier profiling. -bool containsU8(folly::span haystack, std::uint8_t needle); +bool containsU8( + folly::span haystack, std::uint8_t needle) noexcept; bool containsU16( - folly::span haystack, std::uint16_t needle); + folly::span haystack, std::uint16_t needle) noexcept; bool containsU32( - folly::span haystack, std::uint32_t needle); + folly::span haystack, std::uint32_t needle) noexcept; bool containsU64( - folly::span haystack, std::uint64_t needle); + folly::span haystack, std::uint64_t needle) noexcept; template using std_range_value_t = typename std::iterator_traits