Title
Feature test macro value for `apply_result`, `is_applicable`
Status
new
Section
[version.syn]
Submitter
Tomasz KamiƄski

Created on 2026-04-08.00:00:00 last changed 1 week ago

Messages

Date: 2026-04-11.10:34:37

Proposed resolution:

This wording is relative to N5032.

  1. Modify [version.syn] as indicated:

    #define __cpp_lib_apply 202506L202603L // freestanding, also in <tuple>, <type_traits>, <meta>
    
Date: 2026-04-11.10:34:37

The paper P1317R2 "Remove return type deduction in `std::apply`", which changed the definition of `std::apply` and introduced the new traits `is_applicable`, `is_nothrow_applicable`, and `apply_result`, was accepted in Sofia.

In Croydon we moved the P3795R2 "Miscellaneous Reflection Cleanup", that adds the reflection equivalents of above, under `__cpp_lib_reflection`.

This leads to situation, when an implementation that does not yet implement P1317R2, and thus does not define the corresponding meta functions, should not define `__cpp_lib_reflection`.

I propose to assign the following `__cpp_lib_apply` macro values to account to above papers:

  • `202506L` for P1317R2 also in <tuple>, <type_traits>

  • `202603L` for the corresponding parts of P3795R2 also in <meta>

The proposed resolution for the standard working paper represents only the effective end state.

History
Date User Action Args
2026-04-11 10:14:42adminsetmessages: + msg16261
2026-04-08 00:00:00admincreate