Hashable Class

A class with an out-of-line-defined hidden friend qHash overload. More...

Header: #include <hashable.h>

Public Functions

Hashable()
int qHash(Hashable key)
int qHash(Hashable key, int seed)

Detailed Description

Exercises QDoc's resolution of an unqualified \fn command for a friend declaration that carries no inline body and whose definition lives in a separate translation unit. Mirrors the QShaderVersion qHash pattern documented under QTBUG-144141.

Member Function Documentation

[constexpr noexcept default] Hashable::Hashable()

Default-constructs an instance of Hashable.

Related Non-Members

[noexcept] int qHash(Hashable key)

Returns the hash value for key.

Equivalent to calling qHash(key, 0). Inline forwarding overload co-located with the seeded form.

[noexcept] int qHash(Hashable key, int seed)

Returns the hash value for key, using seed to seed the calculation.

The friend declaration in hashable.h carries no body; this definition lives in hashable.cpp. QDoc must recognize this as a hidden friend even though no inline body appears in the class.