This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1878. operator auto template

Section:  []     Status: CD4     Submitter: Daveed Vandevoorde     Date: 2014-02-20

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

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.

Proposed resolution (October, 2014):

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

A conversion function template shall not have a deduced return type ( []).