Skip to content

List comprehension in C++ #5066

Answered by NikolajBjorner
ritam9495 asked this question in Q&A
Discussion options

You must be logged in to vote

Most typically you use a for-loop and push_back on the expr_vector object. With lambdas you can approach code that looks like comprehensions, but of course, C++ does not support comprehensions.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ritam9495
Comment options

Answer selected by NikolajBjorner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants