https://gcc.gnu.org/g:86bfcedd0fe3b3f2833a04d8ffc80b40d902dfbd

commit r16-7868-g86bfcedd0fe3b3f2833a04d8ffc80b40d902dfbd
Author: Marek Polacek <[email protected]>
Date:   Tue Mar 3 09:40:31 2026 -0500

    c++/reflection: add fixed test [PR124324]
    
    Another test for the recently-fixed PR124324.
    
            PR c++/124324
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/reflect/substitute6.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/reflect/substitute6.C | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gcc/testsuite/g++.dg/reflect/substitute6.C 
b/gcc/testsuite/g++.dg/reflect/substitute6.C
new file mode 100644
index 000000000000..8d9665ba933c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/reflect/substitute6.C
@@ -0,0 +1,13 @@
+// PR c++/124324
+// { dg-do compile { target c++26 } }
+// { dg-additional-options "-freflection" }
+
+#include <meta>
+
+template<typename>
+void function ();
+
+constexpr auto substituted = substitute (^^function, {^^int});
+static_assert (is_function (substituted));
+constexpr auto t = type_of (substituted);
+[: t :] bar;

Reply via email to