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

No apparent way to access the tuple size/index as a literal #7

Open
CraftSpider opened this issue Jan 5, 2022 · 2 comments
Open

No apparent way to access the tuple size/index as a literal #7

CraftSpider opened this issue Jan 5, 2022 · 2 comments

Comments

@CraftSpider
Copy link

I find this macro handy for tuple implementations, but have bumped into two related issues:

  1. Accessing the tuple size as a literal. This is useful if one wants, say, an array of the same size as the elements in the tuple as a type
  2. Accessing the current tuple index as a literal in a repetition. Basically, the ability to print out 'accessing tuple index N'
@bkchr
Copy link
Owner

bkchr commented Feb 6, 2022

Hey, do you have any ideas how the syntax could look for each of them?

@CraftSpider
Copy link
Author

If nothing nicer, may be possible to support #length in for_tuples and #index in repetitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants