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

Iterable expansion statements #96

Open
katzdm opened this issue Sep 10, 2024 · 0 comments
Open

Iterable expansion statements #96

katzdm opened this issue Sep 10, 2024 · 0 comments
Labels
feature Feature or behavior from P2996 that is yet to be implemented p2996-ext A behavior not part of P2996, but proposed for a related paper

Comments

@katzdm
Copy link
Collaborator

katzdm commented Sep 10, 2024

Explore the idea of expanding over ranges of constexpr extent which do not require non-transient constexpr allocation.

A motivating example is the std::span returned by define_static_array; i.e., it would be great for this to work:

int fn(int i, int j) {
  template for (constexpr auto p : define_static_array(parameters_of(^^fn)) {
    std::println("{} = {}", identifier_of(p), [:p:]);
  }
  return i + j;
}
@katzdm katzdm added feature Feature or behavior from P2996 that is yet to be implemented p2996-ext A behavior not part of P2996, but proposed for a related paper labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature or behavior from P2996 that is yet to be implemented p2996-ext A behavior not part of P2996, but proposed for a related paper
Projects
None yet
Development

No branches or pull requests

1 participant