ORIGINAL
Loading...
Searching...
No Matches
hash.h File Reference

Provides a generic hashing utility and a base interface for hashable types. More...

#include "config.h"
#include <cstring>
#include <string>
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  original::hash< TYPE >
 Forward declaration of hash class template. More...
 
class  original::hashable< DERIVED >
 Forward declaration of hashable interface template. More...
 

Namespaces

namespace  original
 Main namespace for the project Original.
 

Concepts

concept  original::isHashable
 Concept checking for hashable types.
 

Detailed Description

Provides a generic hashing utility and a base interface for hashable types.

This header defines:

  • A comprehensive hash function object (hash) with specializations for common types
  • A base interface (hashable) for user-defined hashable types
  • Concept checking for hashable types (isHashable)

Hash Function Features:

  • FNV-1a algorithm implementation for byte data
  • Specializations for integral types, pointers, strings, and custom types
  • Fallback implementations for trivially copyable types
  • Support for nullptr handling
Note
All hash functions are noexcept and provide basic hash distribution