Skip to content

rfl::internal::cpp20::num_fields: fix linkage failure for anonymous-namespace structs inside std::optional<T> on AppleClang 17 #110

Done

Description

@clockblocker

Bug

Structs defined inside an anonymous namespace fail to compile under AppleClang 17 when wrapped in std::optional<T>, hitting an internal linkage error at include/rfl/internal/cpp20/num_fields.hpp:78.

Evidence

  • Surfaced in osmium-tool (exp/gp-osmium-tool) and solidity (exp/gp-solidity) Showcase Migrations (Lane 1).
  • Exact failure location: include/rfl/internal/cpp20/num_fields.hpp:78.

Acceptance Criteria

  • Fix num_fields.hpp so structs with internal linkage (anonymous namespace) compile cleanly inside std::optional<T> under AppleClang 17 (as well as GCC/Clang/MSVC).
  • Add a unit test reflecting an anonymous-namespace struct wrapped in std::optional<T> under -Wall -Werror.

Activity

  1. added
    bug
    ready-for-agent
    on Nov 27, 2026
  2. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    Resolved on showcase/all-lanes via Batch 1 merge 4861aafd (commits d4700190, d3673b24). Verified with 962/962 CTest passing under AppleClang 17 -Wall -Werror + REFLECTCPP_STRICT_WARNINGS=ON (non-SYSTEM -I for internal tests, -isystem for downstream consumers) and dual Judge approval (Gemini 4 Neon High: APPROVE WITH NITS, all addressed; Claude Opus 5.5 High re-check: APPROVE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions