
On Jan 26, 2013, at 2:53 PM, Rob Stewart <robertstewart@comcast.net> wrote:
Post-condition: The position
The specified position
is within the returned range.
Almost: If the input is int arr [] = { 1, 2, 3, 4, 5, 7, 9, 11, 13, 15 } and you call gather ( arr, arr + 10, arr + 4, IsEven ) then the output will be: { 1, 3, 2, 4, 5, 7, 9, 11, 13, 15 } and the returned pair will be { arr + 2, arr + 4 } If you add the precondition of pred(*pivot), then, yes, pivot will always be in the returned range. If you don't want to require pred(*pivot), then it might be that the returned range will have pivot as it's "end". (pair.second == pivot) in the case where none(pivot, last, pred) is true. -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki