Title
Add __cpp_lib_deduction_guides to feature test macros
Status
nad
Section
[version.syn]
Submitter
Konstantin Varlamov

Created on 2021-11-09.00:00:00 last changed 11 months ago

Messages

Date: 2023-05-24.14:08:46

Proposed resolution:

This wording is relative to N4901.

  1. Modify [version.syn] as indicated:

    […]
    #define __cpp_lib_coroutine          201902L  // also in <coroutine>
    #define __cpp_lib_deduction_guides   201703L
      // also in <array>, <deque>, <forward_list>, <functional>, <list>, <map>,
      // <memory>, <optional>, <queue>, <regex>, <scoped_allocator>, <set>, <stack>,
      // <string>, <tuple>, <unordered_map>, <unordered_set>, <utility>, <valarray>,
      // <vector>
    #define __cpp_lib_destroying_delete  201806L  // also in <new>
    […]
    
Date: 2023-05-24.14:08:46

[ "We keep changing the deduction guides, and different libraries might be conformant in some headers and not others. The status cannot be represented by a single number." ]

Date: 2023-04-15.00:00:00

[ 2023-04-21; Reflector poll for 'Tentatively NAD' ]

Date: 2022-01-15.00:00:00

[ 2022-01-30; Reflector poll ]

Set priority to 3 after reflector poll. Several votes for NAD as it's too late to be useful, and code which needs to be portable to pre-CTAD compilers can just not use CTAD.

Date: 2021-11-15.00:00:00

[ 2021-11-16; Konstantin Varlamov comments and improves wording ]

One potential topic of discussion is whether the new feature test macro needs to be defined in every library header that contains an explicit deduction guide. While this would be consistent with the current approach, no other macro is associated with such a large set of headers (20 headers in total, whereas the current record-holder is __cpp_lib_nonmember_container_access with 12 headers). For this reason, it should be considered whether perhaps the new macro should only be defined in <version> (which would, however, make it an outlier). The proposed wording currently contains an exhaustive list (note that the deduction guides for <mutex> were removed by LWG 2981).

Date: 2021-11-20.14:10:33

P0433R2, the proposal for adding deduction guides to the standard library, contained a recommendation to use __cpp_lib_deduction_guides as a feature test macro. However, it appears that this feature test macro has been accidentally omitted from the Standard when the paper was applied and probably needs to be added back.

Previous resolution [SUPERSEDED]:

This wording is relative to N4901.

  1. Modify [version.syn] as indicated:

    […]
    #define __cpp_lib_coroutine          201902L  // also in <coroutine>
    #define __cpp_lib_deduction_guides   201703L
      // also in <deque>, <forward_list>, <list>, <map>, <queue>, <set>, <stack>,
      // <unordered_map>, <unordered_set>, <vector>
    #define __cpp_lib_destroying_delete  201806L  // also in <new>
    […]
    
History
Date User Action Args
2023-05-24 14:08:46adminsetmessages: + msg13559
2023-05-24 14:08:46adminsetmessages: + msg13558
2023-05-24 14:08:46adminsetstatus: new -> nad
2022-01-30 17:05:36adminsetmessages: + msg12312
2021-11-20 14:10:33adminsetmessages: + msg12226
2021-11-13 13:09:44adminsetmessages: + msg12214
2021-11-09 00:00:00admincreate