
George van Venrooij wrote:
Hello everyone,
I recently created a MPL-based run-time algorithm named "for_all" which you can find at the following location:
It is based on the "for_each" algorithm. The main difference is that it traverses a sequence of sequences and constructs new sequences that are then passed to a functor. Read the article for more information.
I found it to be very useful in several cases, so I wanted to share it with the community. If you have any comments or spot any problems, please let me know.
It looks nice, but I have a few comments: 1) The name isn't informative. How about something like mpl::all_combinations to better say what the function actually does? 2) You should mention in the documentation that the number of sequences returned can get very big very fast. For instance, given six input sequences with 10 elements each, this function will return 1 million sequences of 6 elements each. Joe Gottman