FuzzTest: Make AsciiString Memory Dictionary Compatible AsciiString uses InRange<char> subdomain. Rename `InRangeImpl::T_is_memory_dictionary_compatible` to `InRangeImpl::is_memory_dictionary_compatible_v` so that containers of InRange<T> are memory dictionary compatible if T is. This allows AsciiString mutation to use comparison tables. PiperOrigin-RevId: 757710052
diff --git a/fuzztest/internal/domains/in_range_impl.h b/fuzztest/internal/domains/in_range_impl.h index be27990..8b6cff5 100644 --- a/fuzztest/internal/domains/in_range_impl.h +++ b/fuzztest/internal/domains/in_range_impl.h
@@ -45,11 +45,11 @@ constexpr static bool T_is_integer = std::numeric_limits<T>::is_integer; constexpr static bool T_is_signed = std::is_signed<T>::value; - constexpr static bool T_is_memory_dictionary_compatible = + constexpr static bool is_memory_dictionary_compatible_v = std::is_integral_v<T> && (sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8); using IntegerDictionaryT = - std::conditional_t<T_is_memory_dictionary_compatible, + std::conditional_t<is_memory_dictionary_compatible_v, IntegerDictionary<T>, bool>; explicit InRangeImpl(T min, T max) : min_(min), max_(max) { @@ -200,7 +200,7 @@ void UpdateMemoryDictionary( const value_type& val, domain_implementor::ConstCmpTablesPtr cmp_tables) { - if constexpr (T_is_memory_dictionary_compatible) { + if constexpr (is_memory_dictionary_compatible_v) { if (cmp_tables != nullptr) { temporary_dict_.MatchEntriesFromTableOfRecentCompares(val, *cmp_tables, min_, max_);