From b69bb2d896d4b177cc5bb80b64e7b8c35cbc89d6 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 29 Sep 2026 10:36:57 -0400 Subject: [PATCH] [expr.const.const] Fix for Example 2 The first error is no longer expected after P4101. --- source/expressions.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 29f4ecf2d0..be9483e02b 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -9188,8 +9188,7 @@ consteval auto g() { return f; } consteval int h(int (*p)() = g()) { return p(); } constexpr int r = h(); // OK -constexpr auto e = g(); // error: a pointer to an immediate function is - // not a permitted result of a constant expression +constexpr auto e = g(); // OK, has consteval-only value struct S { int x;