
1 Dec
2010
1 Dec
'10
4:36 p.m.
I have a following fragment of code: local = boost::begin(f(*current)); local_end = boost::end(f(*current)); local and local_end are two iterators, f is a function that returns a range, and current is some iterator I have around. I would like to initialize two iterators from the range returned by f, but it seems that I only have two choices: create a local range variable or call f twice and have two temporary ranges. Am I missing something, or are these indeed the only choices? Would it be reasonable to have a begin_end (or such) function that returns a tuple of iterators from a range for tuple initialization of two iterators? Currently, the range concepts do not require anything of the sort. Thanks, Marcin
5197
Age (days ago)
5197
Last active (days ago)
0 comments
1 participants
participants (1)
-
Marcin Zalewski