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

Fix #22: This should make looping over temporaries work #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

idkCpp
Copy link

@idkCpp idkCpp commented May 4, 2019

This implements the solution proposed in #22 but with the new insight about double parens.

I also added a helper_scope_block in the tmpl_cc which is used by the foreach block to scope the variable closely to the for loop.

idkCpp added 2 commits May 4, 2019 11:34
This block creates a C++ scope and tracks given variables within
tmpl_seq.

Use it like: helper_scope_block().use([ array of variables ])
When ending its use (which has to be performed manually) just do the
stack.pop(-1).on_end(), which deregisters all variables from tmpl_seq.
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

Successfully merging this pull request may close these issues.

1 participant