I donβt think this will work the same way that equal_range returns a pair of iterators, but for a loop over a range according to the documentation :
The begin_expr and end_expr are defined to be either: If (__range) is an array, then (__range) and (__range + __bound), where __bound is the array bound If (__range) is a class and has either a begin or end member (or both), then begin_expr is __range.begin() and end_expr is __range.end(); Otherwise, begin(__range) and end(__range), which are found based on argument-dependent lookup rules with std as an associated namespace.
I would say that you can define begin and end functions that take a pair of iterators and return the first and second recipe.
Ivaylo strandjev
source share