Skip to content

[super! 1/6] Introduce the *ProBasicMeta* and *ProMeta* named requirements - #66

Open
mingxwa wants to merge 1 commit into
ngcpp:feature/v5from
mingxwa:user/mingxwa/super-stage1
Open

[super! 1/6] Introduce the *ProBasicMeta* and *ProMeta* named requirements#66
mingxwa wants to merge 1 commit into
ngcpp:feature/v5from
mingxwa:user/mingxwa/super-stage1

Conversation

@mingxwa

@mingxwa mingxwa commented Aug 15, 2026

Copy link
Copy Markdown
Member

A "meta" is an object holding metadata deduced from a type at compile time, stored in or referenced by a proxy. proxy creates, copies, assigns, and destroys metadata in contexts specified not to throw, but nothing required a reflector to actually support those operations without throwing, or to be default-constructible at all.

This PR writes those obligations down and enforces them.

  • Adds the ProBasicMeta and ProMeta named requirements.
  • Adds the basic_meta, meta, and basic_reflection concepts.
  • is_reflector_well_formed() now checks meta<R, T> rather than plain constructibility.

Breaking change. A reflector whose constructor may throw, or that cannot be default-constructed, copied, or assigned, is no longer proxiable and is diagnosed as a reflection that is not implemented. Reflectors in the tests and in the documented examples are updated accordingly.

A "meta" is an object holding metadata deduced from a type at compile
time, stored in or referenced by a proxy. proxy creates, copies,
assigns, and destroys metadata in contexts specified not to throw, but
nothing required a reflector to actually support those operations
without throwing, or to be default-constructible at all.

Define the ProBasicMeta and ProMeta named requirements, and enforce them
via the new basic_meta, meta, and basic_reflection concepts.
is_reflector_well_formed() now checks meta<R, T> rather than plain
constructibility, so a reflector that can throw, or that cannot be
default-constructed, copied, or assigned, is no longer proxiable and is
diagnosed as a reflection that is not implemented.

This tightens proxiable: a reflector whose constructor may throw was
previously accepted.
@mingxwa mingxwa changed the title Introduce the *ProBasicMeta* and *ProMeta* named requirements [super! 1/6] Introduce the *ProBasicMeta* and *ProMeta* named requirements Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant