[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 09:19:01 PST 2023
================
@@ -61,6 +61,14 @@ namespace dr2026 { // dr2026: 11
}
}
+namespace dr2049 { // dr2049: 18 drafting
+#if __cplusplus > 202002L
+template <int* x = {}> struct X {};
+X<> a;
+X<nullptr> b;
----------------
tahonermann wrote:
Perhaps add a same-type static assertion for `a` and `b` to ensure a consistent specialization is selected?
https://github.com/llvm/llvm-project/pull/73103
More information about the cfe-commits
mailing list