Movatterモバイル変換


[0]ホーム

URL:


Issue 1878 - WG21 CWG Issues
Title
operator auto template
Status
cd4
Section
9.2.9.7 [dcl.spec.auto]
Submitter
Daveed Vandevoorde

Created on2014-02-20.00:00:00 last changed3 months ago

Messages

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

[Moved to DR at the November, 2014 meeting.]

msg5364 (view)
Date: 2025-11-15.00:00:00

Additional notes (November, 2025)

Seeissue 1670 for non-templateconversion functions with a placeholder return type.

msg5134 (view)
Date: 2014-10-15.00:00:00

Proposed resolution (October, 2014):

Add the following as the last paragraph of11.4.8.3 [class.conv.fct]:

A conversion function template shall not have a deduced returntype (9.2.9.7 [dcl.spec.auto]).
msg5028 (view)
Date: 2014-02-20.00:00:00

The Standard currently appears to allow something like

  struct S {    template<class T> operator auto() { return 42; }  };

This is of very limited utility and presents difficulties forsome implementations. It might be good to prohibit such constructs.

History
DateUserActionArgs
2025-11-08 14:31:50adminsetmessages: +msg8378
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-05-25 00:00:00adminsetstatus: dr -> drwp
2015-04-13 00:00:00adminsetmessages: +msg5364
2014-11-24 00:00:00adminsetstatus: tentatively ready -> dr
2014-10-13 00:00:00adminsetmessages: +msg5134
2014-10-13 00:00:00adminsetstatus: drafting -> tentatively ready
2014-07-07 00:00:00adminsetstatus: open -> drafting
2014-02-20 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp