This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
4316.{can_}substitute
specification is ill-formed
Section: 21.4.13 [meta.reflection.substitute] Status: New Submitter: Matthias Wippich Opened: 2025-08-15 Last modified: 2025-08-17
Priority: Not Prioritized
View all issues with New status.
Discussion:
can_substitute
and substitute
are currently specified in terms of splices in a template argument list:
Returns:
true
ifZ<[:Args:]...>
is a valid template-id (13.3 [temp.names]) that does not name a function whose type contains an undeduced placeholder type. Otherwise,false
.
21.4.13 [meta.reflection.substitute] p7:
Returns:
^^Z<[:Args:]...>
.
This wording was introduced in P2996R11. However, merging in changes from P3687 "Final Adjustments to C++26 Reflection" in P2996R13 changed the rules for splices in this context. This makes can_substitute
and substitute
as specified currently ill-formed. We cannot use the given syntax to splice an arbitrary choice of values, types and templates anymore.
Proposed resolution:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4