Displaying 2 results from an estimated 2 matches for "n3513".
Did you mean:
3513
2014 Mar 19
3
[LLVMdev] [RFC] Add empty() method to iterator_range.
...s (e.g., front(), back(), and (for random access
iterators) operator[]) would also be useful.
[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1871.html
[2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3350.html
[3]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3513.html#range-arg
2014 Mar 19
5
[LLVMdev] [RFC] Add empty() method to iterator_range.
Hi all,
As RFCs go this is short and sweet - I think it would be nice to add an
empty method to iterator_range. Something like:
bool empty() const { return begin() != end(); }
My motivation is to make the 'if' test at the start of this common pattern
tidier:
if (!collection.empty())
// initialization...
for (auto& c : collection)
// do something for each c.
which I think that