Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow direct reflection of a dependent qualified-id having a splicer #14

Closed
katzdm opened this issue Mar 16, 2024 · 1 comment
Closed
Labels
p2996-speculative A behavior considered for adoption in P2996, but not yet been agreed on

Comments

@katzdm
Copy link
Collaborator

katzdm commented Mar 16, 2024

P2996 currently parses the following syntax as an expression:

constexpr auto R = ^[:S:]::inner;

whenever S is dependent on a template parameter. In the case where [:S:]::inner names a type, one could instead write:

constexpr auto R = ^typename [:S:]::inner;

but since P2996R2 removed the namespace [:R:] syntax, if [:S:]::inner names a nested namespace, then one instead must write:

using namespace Alias = [:S:];
constexpr auto R = ^Alias::inner;

Since it is known that the form ^[:S:]::inner will be parsed as an expression of type std::meta::info, it should be feasible to represent it as a reflection having kind e.g., RK_dependent_qualified_id, and to rebuild it as a reflection holding either a namespace, type, template, or expression during tree transform. It would be good to demonstrate the feasibility of this transformation with working code.

@katzdm katzdm added the p2996-speculative A behavior considered for adoption in P2996, but not yet been agreed on label Mar 16, 2024
@katzdm
Copy link
Collaborator Author

katzdm commented May 24, 2024

Not planning to adopt this for P2996, and therefore will not implement for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2996-speculative A behavior considered for adoption in P2996, but not yet been agreed on
Projects
None yet
Development

No branches or pull requests

1 participant