boostorg / range

Boost.org range module
http://boost.org/libs/range
42 stars 101 forks source link

Update transform.hpp #5

Closed insideoutclub closed 10 years ago

insideoutclub commented 10 years ago

Ticket #9812 BinaryOperation boost::transform only stops when it reaches the end of rng1, even if rng2 is shorter

The docs for binary transform indicate that iteration should stop when either range reaches its end. However, the original implementation only stops when rng1 is finished, and asserts if rng2 reaches its end before rng1. I modified the transform to stop when either rng is exhausted. This behavior matches the existing documentation.

This is my first pull request, so I'm learning. Please give constructive suggestions if there are parts of the process I'm missing or things I can do to make the process smoother.

Thanks, David

HighCommander4 commented 10 years ago

Thanks for the patch - it looks good!

However, could you please make the pull request against the 'develop' branch rather than 'master'? Thanks!

insideoutclub commented 10 years ago

Done. I created a new pull request against the 'develop' branch.

Thanks, David

HighCommander4 commented 10 years ago

Thanks! I merged the new pull request. Closing this one.