
23 Jun
2011
23 Jun
'11
8:14 a.m.
On 22/06/11 21:31, er wrote: <snip>
Conversion from ranges to containers
This sentence doesn't make sence to me. std::container(range.begin(), range.end()) is supported by all containers.
Please see Conversion in the tutorial. The first sentence gives it away:
This section deals with conversion from a Range to collections of elements that need not (but may) support iterators.
As I see it, the primary advantage of this conversion feature is that you can use it when th range only exists as a temporary. e.g. if a function returns a range, you can use it without first assigning that range to a variable. Perhaps this aspect could be made more clear? John Bytheway