I need to concatenate multiple instances of boost::iterator_range.
My initial idea was to use boost::join, but it looks like it takes only two ranges as parameters.
On another question I found that the most voted answer was "well, just call join again", but that is not working in my case.
I realized the reason might be that I do not know at compile time the exact number of ranges I am going to join, resulting in boost::join not knowing its return type.
To make it more clear, I need to use it in a ranged for loop, such as the following:
SomeRangeType result;
for ( const auto& a_range : some_list_of_ranges )
{
result = boost::join( result, a_range );
}
return result;
Does another join-like operation like the one I need exist in boost?