From 29dbf3fd70509889724dda05badaa61dd9042825 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 Fixes 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 31f91c4c9b..98d45bf18b 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1866,7 +1866,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 c40f6339411f05c35e51a1ceb9a3a7bdc2575eb7 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 742e3c6493..e5579e4c12 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -2711,7 +2711,6 @@ \begin{example} \begin{codeblock} struct S { - operator auto() const { return 10; } // OK template operator auto() const { return 1.2; } // error: conversion function template };