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::container_deduction< C > Struct Template Reference

User customization point for container element deduction. More...

Detailed Description

template<typename C>
struct jh::container_deduction< C >

User customization point for container element deduction.

This template allows users to explicitly register the value type of custom or non-standard containers that cannot be automatically deduced by the generic detection logic.

When specialized, this helper provides a consistent value_type that will be used in preference to any automatic deduction. The specialization must define:

template<>
struct jh::container_deduction<YourContainer> {
using value_type = YourElementType;
};
User customization point for container element deduction.
Definition container_traits.h:122

Registration should be used in the following cases:

  • The container does not define value_type internally.
  • The container's value_type does not match the element type deduced from its iterator behavior.

In either case, a registered specialization of this template takes precedence over all deduction mechanisms and resolves conflicts between declared and deduced types.


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