Skip to content

Prototype bitflag enum detection and opt-in for wrapped bitsets lacking operator| #93

Not planned

Description

@clockblocker

Question

How should reflect-cpp handle bitflag enums wrapped in custom bitset types (like ccache's util::BitSet<core::Sloppy>) that do not define namespace-scope operator|, so high bitflags are never silently dropped during serialization/deserialization?

Evidence & Context

  • Parent map: Map (Lane 1): Core Hygiene & Perf
  • ccache#2: util::BitSet<core::Sloppy> silently dropped 1<<9..1<<13 because enchantum::is_bitflag relies on namespace-scope operator| detection.

Prototype & Measurement Plan

  • Prototype on: showcase/all-lanes — evaluate an explicit opt-in trait (e.g., rfl::is_bitflag_enum_v<E> specialization / Reflector hook), safer fallback detection, and/or compile-time or runtime diagnostics when a bitmask value exceeds non-bitflag enum assumptions.
  • Measure against real Showcase Migration: Test against ccache#2 (util::BitSet<core::Sloppy> including bits 1<<9..1<<13) and verify full round-trip fidelity with zero silent bit drops.
  • Judges & landing: Run Judges (gemini-4-neon + claude-opus-5-5 high via antigravity delegates) on the prototype diff and measurements; if green, hand to coordinator to land on showcase/all-lanes.

Activity

  1. added
    wayfinder:prototype
    on Nov 27, 2026
  2. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    Closing as out of scope (deferred indefinitely — low/negative ROI). Niche wrapped-bitflag glue is deferred until personally hit in an owned project. Recorded under ## Out of scope on Lane 1 Map #85 and Umbrella Map #84.

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

    wayfinder:prototype

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions