1. Introduction
SG7 is the WG21 study group for Reflection and Compile-Time Programming. It is not a study group for library or API design, especially detailed design. WG21 is seeing an increased number of papers that potentially overlap with SG7’s domain as the core reflection and compile-time programming facilities become both increasingly available and increasingly in demand. We need guidelines for when proposals need SG7’s specific review.
A core principle of these guidelines is to form basic rubrics, even if somewhat vague, that can be used to choose an initial target subgroup of WG21 for proposal review. The group may end up being incorrect after discussion occurs and the fundamentals of the proposal become better understood. That is working as intended. This system is not intended to be perfect, merely to make misclassification reasonably rare.
2. Compile-Time Programming Facilities
First and foremost, SG7 is responsible for things that satisfy all of these things:
-
It must be a compile-time construct, and
-
It must involve programming, i.e. it must involve logic and/or computation, and
-
It must be a facility for these things, not merely an application or usage of them.
These are our high-level principles for whether a proposal requires SG7 review. Some more specific guidelines to help evaluate proposals:
- ❌ No Review Needed
-
Library proposals that merely use existing
facilities.constexpr - ❌ No Review Needed
-
Library proposals that can use
facilities to implement simple, convenience transformations of types and values.constexpr - ✅ Review Needed
-
Library proposals that form building blocks for logic or computation.
- ✅ Review Needed
-
Library proposals that provide code synthesis.
3. Reflection Facilities
High level principles of what concerns SG7 has with reflection-related proposals:
-
It allows introspection of the source, types, APIs, names, or program, or
-
It allows synthesis of source, types, APIs, names, values, or programs.
3.1. Type Traits
- ❌ No Review Needed
-
A type trait that can be implemented entirely based upon already approved (by SG7) reflection facilities.
- ❌ No Review Needed
-
A type trait that exposes properties of types that are already clearly observable in the behavior of the type within C++ code.
- ✅ Review Needed
-
A type trait that exposes information about how source code is written in a way that is not clearly observable by C++ code interacting with the type.