diff --git a/doc/ApiReference.md b/doc/ApiReference.md index 40b97a6..74394e3 100644 --- a/doc/ApiReference.md +++ b/doc/ApiReference.md @@ -413,6 +413,21 @@ as [`_from_string`](#_from_string). In case of failure, sets the stream's +### Hashing + +#### macro BETTER_ENUMS_DECLARE_STD_HASH(Enum) + +Use this outside namespace scope to declare a specialization of `std::hash` for +the type `Enum`. For example: + + // This declaration might be inside a namespace. + BETTER_ENUM(Channel, int, Red, Green, Blue) + + // Later, outside the namespace: + BETTER_ENUMS_DECLARE_STD_HASH(Channel) + + + %% class = api %% description = Detailed description of the Better Enums API.