From 118734df0a1f76475f856cf13c6d284afad549be Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sun, 16 Feb 2025 13:01:38 -0500 Subject: [PATCH] [dcl.type.auto.deduct] Make `f1` example well-formed --- source/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index b7f1c66f26..5f72b5f0f4 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -2182,7 +2182,7 @@ decltype(auto) x6d = { 1, 2 }; // error: \tcode{\{ 1, 2 \}} is not an expression auto *x7a = &i; // \tcode{decltype(x7a)} is \tcode{int*} decltype(auto)*x7d = &i; // error: declared type is not plain \tcode{decltype(auto)} -auto f1(int x) -> decltype((x)) { return (x); } // return type is \tcode{int\&} +auto f1(int x) -> decltype((x)); // return type is \tcode{int\&} auto f2(int x) -> decltype(auto) { return (x); } // return type is \tcode{int\&\&} \end{codeblock} \end{example} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy