15 #ifndef ABSL_HASH_INTERNAL_SPY_HASH_STATE_H_ 16 #define ABSL_HASH_INTERNAL_SPY_HASH_STATE_H_ 28 namespace hash_internal {
58 other.moved_from_ =
true;
67 other.moved_from_ =
true;
70 template <
typename A,
typename... Args>
72 const Args&... args) {
82 *s.
error_ =
"AbslHashValue should not be invoked directly.";
84 *s.
error_ =
"Used moved-from instance of the hash state object.";
102 return !(lhs == rhs);
130 if (offset % 16 == 0) {
133 if (offset % 2 == 0) {
147 const unsigned char*
begin,
150 reinterpret_cast<const char*>(begin), size);
154 using SpyHashStateImpl::HashStateBase::combine_contiguous;
158 return "Returned a moved-from instance of the hash state object.";
164 template <
typename U>
176 std::shared_ptr<absl::optional<std::string>>
error_;
180 template <
typename T>
189 template <
void (*)()>
195 template <
void (*f)()>
199 typename T,
typename U,
216 #endif // ABSL_HASH_INTERNAL_SPY_HASH_STATE_H_ SpyHashStateImpl(SpyHashStateImpl &&other) noexcept
friend bool operator==(const SpyHashStateImpl &lhs, const SpyHashStateImpl &rhs)
absl::optional< std::string > error() const
std::vector< std::string > hash_representation_
std::enable_if< std::is_same< B, bool >::value, H >::type AbslHashValue(H hash_state, B value)
static SpyHashStateImpl combine(SpyHashStateImpl s)
SpyHashStateImpl(SpyHashStateImpl< U > &&other)
std::string StrJoin(Iterator start, Iterator end, absl::string_view sep, Formatter &&fmt)
ABSL_MUST_USE_RESULT str_format_internal::Streamable StreamFormat(const FormatSpec< Args... > &format, const Args &... args)
friend std::ostream & operator<<(std::ostream &out, const SpyHashStateImpl &hash_state)
typename std::enable_if< B, T >::type enable_if_t
static void SetDirectAbslHashValueError()
bool EndsWith(absl::string_view text, absl::string_view suffix)
static bool direct_absl_hash_value_error_
friend bool operator!=(const SpyHashStateImpl &lhs, const SpyHashStateImpl &rhs)
SpyHashStateImpl & operator=(SpyHashStateImpl &&other) noexcept
std::shared_ptr< absl::optional< std::string > > error_
static SpyHashStateImpl combine(SpyHashStateImpl s, const A &a, const Args &... args)
SpyHashStateImpl & operator=(const SpyHashStateImpl &)=delete
static SpyHashStateImpl combine_contiguous(SpyHashStateImpl hash_state, const unsigned char *begin, size_t size)
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
static CompareResult Compare(const SpyHashStateImpl &a, const SpyHashStateImpl &b)