microsoft / microsoft/STL

P2996R13 `<meta>`: Reflection

Open
#5,606 1 comment 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compiler cxx26
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

WG21-P2996R13 <meta>: Reflection
WG21-P3096R12 Function Parameter Reflection
WG21-P3293R3 Splicing A Base Class Subobject
WG21-P3394R4 Annotations For Reflection
WG21-P3491R3 is_string_literal(), define_static_string(), define_static_object(), define_static_array()
WG21-P3560R2 Error Handling In Reflection
WG21-P3795R2 Miscellaneous Reflection Cleanup
WG21-P3856R8 is_structural_type(), is_structural
WG21-P3914R0 Assorted NB Comment Resolutions For Kona 2025 (sections 2.6 and 2.7)
WG21-P3923R0 Additional NB Comment Resolutions For Kona 2025 (section 2.7)
WG21-P4156R0 Rename meta::has_ellipsis_parameter To meta::is_vararg_function
LWG-4316 {can_}substitute specification is ill-formed
LWG-4416 <meta> should include <compare>
LWG-4422 meta::access_context should be a consteval-only type
LWG-4423 meta::data_member_spec allows negative bit-field widths
LWG-4424 meta::define_aggregate should require a class type
LWG-4426 Clarify what meta::reflect_constant_string considers a string literal
LWG-4427 meta::dealias needs to work with things that aren't entities
LWG-4428 Metafunctions should not be defined in terms of constant subexpressions
LWG-4429 meta::alignment_of should exclude data member description of bit-field
LWG-4432 Clarify element initialization for meta::reflect_constant_array
LWG-4433 Incorrect query for C language linkage
LWG-4434 meta::is_accessible does not need to consider incomplete D
LWG-4435 meta::has_identifier doesn't handle all types
LWG-4442 Clarify expr and fn for meta::reflect_object and meta::reflect_function
LWG-4443 Clean up identifier comparisons in meta::define_aggregate
LWG-4449 define_aggregate members must be public
LWG-4478 meta::has_identifier is not specified for annotations
LWG-4483 Multidimensional arrays are not supported by meta::reflect_constant_array and related functions
LWG-4496 Precedes vs Reachable in [meta.reflection]
LWG-4517 data_member_spec should throw for cv-qualified unnamed bit-fields
LWG-4537 Improve define_static_array
LWG-4555 Remove is_consteval_only
LWG-4556 Unclear properties of reflection strings
LWG-4567 Feature-test macro value for apply_result, is_applicable

These are obviously Core papers with major Library impact. (Some were voted in as purely Library papers.)

Feature-test macros:

#define __cpp_lib_define_static 202506L
#define __cpp_lib_is_structural 202603L
#define __cpp_lib_reflection    202603L

INCREASED feature-test macro, note that LWG-4567 increased it to 202506L for WG21-P1317R2 tracked by #5620 and then further increased it to:

#define __cpp_lib_apply 202603L

My VS-PR-738409 taught the IDE about this new extensionless header.

Note: We are not yet accepting PRs for C++26 features.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by reading the listed WG21 and LWG papers together with the feature-test macro requirements, then inspect the repository's existing standard-library feature tracking; completion would require coordinated C++26 reflection support, but the issue explicitly says PRs are not yet being accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.