Title
operator auto template
Status
cd4
Section
9.2.9.7 [dcl.spec.auto]
Submitter
Daveed Vandevoorde

Created on 2014-02-20.00:00:00 last changed 87 months ago

Messages

Date: 2014-11-15.00:00:00

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

Date: 2014-10-15.00:00:00

Proposed resolution (October, 2014):

Add the following as the last paragraph of 11.4.8.3 [class.conv.fct]:

A conversion function template shall not have a deduced return type (9.2.9.7 [dcl.spec.auto]).
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 for some implementations. It might be good to prohibit such constructs.

History
Date User Action Args
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