|
|
Donner
C++20 SVG rendering library
|
Defines a constexpr-friendly associative container built on top of a perfect-hash layout for fixed key sets. More...
#include <algorithm>#include <array>#include <cstddef>#include <cstdint>#include <functional>#include <limits>#include <optional>#include <string_view>#include <type_traits>#include <utility>#include "donner/base/Utils.h"Classes | |
| struct | donner::CompileTimeMapTables< N > |
| Perfect-hash metadata used to resolve keys into storage slots. More... | |
| struct | donner::CompileTimeMapDiagnostics |
| Diagnostics describing how a CompileTimeMap was constructed. More... | |
| class | donner::CompileTimeMap< Key, Value, N, Hasher, KeyEqual > |
| Compile-time associative container backed by a perfect hash layout. More... | |
| struct | donner::detail::CompileTimeMapResult< Key, Value, N, Hasher, KeyEqual > |
| Contains the constructed map and associated build status. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Macros | |
| #define | makeCompileTimeMap(...) |
| Primary API for building a CompileTimeMap with compile-time error checking. | |
Enumerations | |
| enum class | donner::CompileTimeMapStatus { donner::kOk , donner::kUsingFallbackHash , donner::kDuplicateKey , donner::kSeedSearchFailed , donner::kConstexprHashUnsupported } |
| Indicates the result of building a CompileTimeMap. More... | |
Functions | |
| constexpr std::size_t | donner::mixHash (std::size_t baseHash, std::uint32_t seed) |
| template<typename Key> | |
| constexpr bool | donner::supportsConstexprHash () |
| template<typename Key> | |
| constexpr std::size_t | donner::constexprHashValue (const Key &key) |
| template<typename Key, std::size_t N, typename KeyEqual> | |
| constexpr bool | donner::hasDuplicateKeys (const std::array< Key, N > &keys, KeyEqual keyEqual) |
| Returns true when the provided keys contain duplicates. | |
| template<typename Key, typename Value, std::size_t N, typename Hasher = std::hash<Key>, typename KeyEqual = std::equal_to<Key>> | |
| constexpr CompileTimeMapResult< Key, Value, N, Hasher, KeyEqual > | donner::detail::makeCompileTimeMapWithDiagnostics (const std::array< std::pair< Key, Value >, N > &entries, Hasher hasher=Hasher{}, KeyEqual keyEqual=KeyEqual{}) |
| Builds a CompileTimeMap from an array of key/value pairs with full diagnostics. Most users should use the wrapper makeCompileTimeMap instead. | |
Defines a constexpr-friendly associative container built on top of a perfect-hash layout for fixed key sets.
| struct donner::CompileTimeMapTables |
Perfect-hash metadata used to resolve keys into storage slots.
| struct donner::CompileTimeMapDiagnostics |
Diagnostics describing how a CompileTimeMap was constructed.
| #define makeCompileTimeMap | ( | ... | ) |
Primary API for building a CompileTimeMap with compile-time error checking.
Usage:
}));