Changeset 0760525 in Lumiera

Timestamp:
2026-04-07T04:32:23Z (2 weeks ago)
Author:
Ichthyostega <prg@…>
Branches:
dev/play
Children:
a0d83b4
Parents:
a835a79
Message:

Library: deep dive into type reconciliation and tuple handling

This commit is the aggregated result of extended research
that is only loosely related to current development topics.

One theme was the construction of nested data structures using tuples,
which faces some difficulties due to tuple manipulations being limited
almost entirely to compile-time processing. However, the barrier between
compile-time and runtime can be overcome with the help of a dispatcher
table -- which leads to the secondary problem to handle the diverse
tuple elements with a common, generic functor. Such a functor can be
constructed, if and only if those element types are reconcilable

The STDLIB provides two metafunctions, std::common_type and
std::common_refernce, which however pose some challenges for the
task at hand, since they include additional processing. In the end,
a custom version of the basic type reconciliation was implemented
and tested, and then used as foundation to build a dispatcher table
for runtime-indexed access and iteration over tuples.

As an aside, several deeply hidden bugs in our library code were resolved,
and the tuple-helpers, tuple string rendering and associated utilities
were regrouped and modernised.

As result of this research work, the following components are provided:

  • meta/common-result
  • meta/fun-trampoline
  • meta/tuple-index-adaptor
(No files)

Note: See TracChangeset for help on using the changeset viewer.