JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::meta::extension::key_traits< T > Struct Template Referencefinal

Default key conversion traits. More...

#include <jh/metax/lookup_map.h>

Public Types

using canonical_type = T
using apparent_type = const T &

Static Public Member Functions

static constexpr canonical_type to_canonical (apparent_type &v) noexcept
 Convert apparent value to canonical key.

Detailed Description

template<typename T>
struct jh::meta::extension::key_traits< T >

Default key conversion traits.

Defines canonical key type as T and accepts const T& as the apparent lookup input. Derived specializations may override conversion rules to enable heterogeneous lookup.

Template Parameters
TKey canonical type.

Member Function Documentation

◆ to_canonical()

template<typename T>
constexpr canonical_type jh::meta::extension::key_traits< T >::to_canonical ( apparent_type & v)
inlinestaticconstexprnoexcept

Convert apparent value to canonical key.

Parameters
vInput key reference.
Returns
Canonical key value.

The documentation for this struct was generated from the following file: