Movatterモバイル変換


[0]ホーム

URL:


Issue 1942 - WG21 CWG Issues
Title
Incorrect reference to trailing-return-type
Status
cd4
Section
7.5.6 [expr.prim.lambda]
Submitter
Mike Miller

Created on2014-06-16.00:00:00 last changed109 months ago

Messages

msg6044 (view)
Date: 2015-05-15.00:00:00

[Moved to DR at the May, 2015 meeting.]

msg5161 (view)
Date: 2014-11-15.00:00:00

Proposed resolution (November, 2014):

  1. Change 7.5.6 [expr.prim.lambda] paragraph 4 as follows:

  2. If alambda-expression does not includealambda-declarator, it is as ifthelambda-declarator were(). The lambda return typeisauto, which is replaced bythe type specified bythetrailing-return-type if provided and/or deducedfromreturn statements as described in9.2.9.7 [dcl.spec.auto]. [Example:...
  3. Change 9.3.4.6 [dcl.fct] paragraph 2 as follows:

  4. The type of thedeclarator-id inD is“derived-declarator-type-list function of(parameter-declaration-clause)cv-qualifier-seqoptref-qualifieroptreturningtrailing-return-typeU,whereU is the type specified by thetrailing-return-type. Theoptionalattribute-specifier-seq...
msg5100 (view)
Date: 2014-06-16.00:00:00

According to 7.5.6 [expr.prim.lambda] paragraph 4,

If alambda-expression does not includealambda-declarator, it is as ifthelambda-declarator were(). The lambda returntype isauto, which is replaced bythetrailing-return-type if provided...

trailing-return-type is a syntactic nonterminal thatincludes the-> and thus cannot be used directly torefer to the type. It should instead say something like, ...thetype specified by thetrailing-return-type.

The reference in 9.3.4.6 [dcl.fct] paragraph 2, “...returningtrailing-return-type” should be similarly adjusted.

History
DateUserActionArgs
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-11-10 00:00:00adminsetstatus: dr -> drwp
2015-05-25 00:00:00adminsetmessages: +msg6044
2015-05-25 00:00:00adminsetstatus: tentatively ready -> dr
2014-11-24 00:00:00adminsetmessages: +msg5161
2014-11-24 00:00:00adminsetstatus: open -> tentatively ready
2014-06-16 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp