This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2707. Deduction guides cannot have a trailing requires-clause

Section: 13.7.2.3  [temp.deduct.guide]     Status: DRWP     Submitter: Richard Smith     Date: 2020-02-26

[Accepted as a DR at the March, 2024 meeting.]

The grammar for deduction-guide does not, but should, allow a trailing requires-clause:

deduction-guide:
   explicit-specifieropt template-name ( parameter-declaration-clause ) -> simple-template-id ;

Proposed resolution (approved by CWG 2023-11-11):

Change the grammar in 13.7.2.3 [temp.deduct.guide] paragraph 1 as follows:

deduction-guide:
   explicit-specifieropt template-name ( parameter-declaration-clause ) requires-clauseopt -> simple-template-id ;