P1354R0
SG7 Guidelines for Review of Proposals

Published Proposal,

This version:
https://wg21.link/p1354r0
Author:
Audience:
SG7
Project:
ISO/IEC JTC1/SC22/WG21 14882: Programming Language — C++

Abstract

Guidelines for when a WG21 proposal should be reviewed by SG7, the reflection and compile-time programming study group.

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:

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 constexpr facilities.

Using compile-time policies to select run-time implementations.
❌ No Review Needed

Library proposals that can use constexpr facilities to implement simple, convenience transformations of types and values.

A library metafunction std::copy_const.
✅ Review Needed

Library proposals that form building blocks for logic or computation.

A library metafunction std::is_any_type_true_v<Ts...>.
✅ Review Needed

Library proposals that provide code synthesis.

A library metafunction std::generate_wrapper<T>::type.

3. Reflection Facilities

High level principles of what concerns SG7 has with reflection-related proposals:

3.1. Type Traits

❌ No Review Needed

A type trait that can be implemented entirely based upon already approved (by SG7) reflection facilities.

A trait that exposes information about enums via the enum 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.

A trait that exposes strong structural equality.
A trait testing for whether an enum is a scoped enum.
✅ 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.

A trait that exposes the number of overloads in an overload set.
A trait that exposes whether a particular constructor is user-provided —despite contributing to observable properties, this aspect is not directly observed. This is a borderline case, but just over the line towards SG7.