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

arguments for product #41

Open
aolluisma opened this issue Oct 13, 2017 · 5 comments
Open

arguments for product #41

aolluisma opened this issue Oct 13, 2017 · 5 comments

Comments

@aolluisma
Copy link

  • in many use cases, the number of arguments for a function like this is known only at run time. is it possible for product to accept a vector object?
  • or add something equivalent to Python's unpacking operator (*) to cppitertools?
@ryanhaining
Copy link
Owner

Can you show me an example of how you'd like to call the function? So that I understand your intent

@aolluisma
Copy link
Author

aolluisma commented Oct 14, 2017 via email

@ryanhaining
Copy link
Owner

ryanhaining commented Oct 15, 2017

You can do an "unpack" with a tuple, pair, even std::array, any time the size is known at compile time (see iter::starmap) but you can't send a variable number of arguments when you don't know the length until run time. Supporting what you want would require an entire new implementation, not saying I won't do it but it's not an easy modification.

@aolluisma
Copy link
Author

aolluisma commented Oct 15, 2017 via email

@alphahmed
Copy link

alphahmed commented Feb 13, 2021

I used boost lexical_cast to read the tuple elements into a string. Very efficient.

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

3 participants