Skip to content

Restore cross-translation-unit type matching in basic_any - #1354

Closed
skypjack with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-type-matching-issue
Closed

skypjack with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-type-matching-issue

Conversation

Copilot AI commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Optimized builds could fail to find a registry context value when its type was instantiated across translation units. The any refactor had removed a typed vtable-identity check used by any_cast.

  • Type matching: Restore the vtable identity fast path while retaining the hash fallback:
    return (vtable == &basic_vtable<Type>) || (underlying_type == type_hash<Type>::value());
  • Coverage: Add a cross-translation-unit registry context case with explicit template instantiation, checking both default and explicit IDs.

Copilot AI and others added 3 commits October 1, 2026 17:02
Co-authored-by: skypjack <1812216+skypjack@users.noreply.github.com>
Co-authored-by: skypjack <1812216+skypjack@users.noreply.github.com>
Co-authored-by: skypjack <1812216+skypjack@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix type matching issue in registry context Restore cross-translation-unit type matching in basic_any Oct 1, 2026
Copilot AI requested a review from skypjack October 1, 2026 17:07
@skypjack skypjack closed this Oct 23, 2026
@skypjack
skypjack deleted the copilot/fix-type-matching-issue branch October 23, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type matching issue in registry context introduced in entt 3.16.0

2 participants