Reflection
^^ reflection, splicing, annotations, define_static_*, parameter reflection, error handling and the post-adoption cleanup.
Connected features
Papers
10 · Sofia 2025 → Croydon 2026Introduces static reflection: the ^^ operator, std::meta::info, splicers [: :] and the <meta> metafunction library.
Adds reflection of function parameters (names, types, presence of defaults).
Allows splicing a reflection of a base class to reach the base subobject of an object.
Adds annotations [[=expr]] that attach constant values to declarations, readable through reflection.
Adds define_static_string, define_static_object and define_static_array to promote constant data into static storage.
Specifies error handling in reflection metafunctions via exceptions thrown during constant evaluation.
Resolves CWG3158 on how const applies to splice expressions.
Miscellaneous cleanup of the reflection API and wording after national-body review.
Adds the std::meta::is_structural_type metafunction.
Renames meta::has_ellipsis_parameter to meta::is_vararg_function.