Opened 12 years ago

Closed 9 years ago

#4572 closed Feature Requests (fixed)

Add make_iterator_range(void*, size_t)

Reported by: olafvdspek@… Owned by: Neil Groves
Milestone: Boost 1.56.0 Component: range
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

Could you add a variant of make_iterator_range that takes a pointer and size pair? This is handy when the pointer is the result of a complex expression which you don't want to repeat or assign to a temp var.

Attachments (1)

make_iterator_range_with_size.diff (957 bytes ) - added by Kyle Lutz <kyle.r.lutz@…> 10 years ago.
Patch for Boost.Range implementing make_iterator_range(begin, size)

Download all attachments as: .zip

Change History (9)

comment:1 by Neil Groves, 12 years ago

Status: newassigned

comment:2 by Olaf van der Spek <olafvdspek@…>, 11 years ago

Hi Neil,

Need any help on this one?

comment:3 by Olaf van der Spek <olafvdspek@…>, 10 years ago

Mr Groves?

by Kyle Lutz <kyle.r.lutz@…>, 10 years ago

Patch for Boost.Range implementing make_iterator_range(begin, size)

comment:4 by Kyle Lutz <kyle.r.lutz@…>, 10 years ago

Hi,

I also think this functionality would be useful. I've attached a patch implementing make_iterator_range() overload for an iterator and a size.

-kyle

comment:5 by Neil Groves, 9 years ago

Milestone: To Be DeterminedBoost 1.56.0

Implemented this as make_iterator_range_n to avoid ambiguity issues and to make the semantics clearly distinct from the make_iterator_range versions that take integer values to adjust the first and last iterators.

This is committed to the develop branch and will shortly merge to master for release 1.56.

comment:6 by Olaf van der Spek <ml@…>, 9 years ago

Finally, thanks a lot!

comment:7 by Neil Groves, 9 years ago

Cheeky! You are right though I've been unable to make nearly as much time as I wanted to. I'm finally in a situation where I can have my own life back!

I did look at this numerous times and the patches kept causing numerous regressions when I tested them with code I had access to. I should have reverted to the simple separate function name sooner.

I'll close this when I merge to master. Thanks for your patience.

comment:8 by Neil Groves, 9 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.