From 941728e3137874813239fadff31eafade02db7c7 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 9 Nov 2025 16:25:44 +0100 Subject: [PATCH 1/2] CWG1670 auto as conversion-type-id Also a late resolution of NB FI 4 (C++14 CD). --- source/declarations.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index ea7f08fc55..510def3e41 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1859,7 +1859,8 @@ \pnum A placeholder type can appear in the \grammarterm{decl-specifier-seq} or \grammarterm{type-specifier-seq} -in the declared return type of a function declarator that declares a function; +in the declared return type of a function declarator +that declares a function other than a conversion function\iref{class.conv.fct}; the return type of the function is deduced from non-discarded \tcode{return} statements, if any, in the body of the function\iref{stmt.if}. From 1a315f5c3c3ce3ef479eddf2040cb1b5a023005b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 9 Nov 2025 16:32:01 +0100 Subject: [PATCH 2/2] [class.conv.fct] Remove line incorrectly stating that "operator auto" is well-formed --- source/classes.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/classes.tex b/source/classes.tex index 0be1a5e509..6e306c54c1 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -2712,7 +2712,6 @@ \begin{example} \begin{codeblock} struct S { - operator auto() const { return 10; } // OK template operator auto() const { return 1.2; } // error: conversion function template };