[llvm] r248447 - Add iterator_range::end() predicate.
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 17:10:53 PDT 2015
On Wed, Sep 23, 2015 at 7:58 PM, Rui Ueyama via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Wed Sep 23 18:58:29 2015
> New Revision: 248447
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248447&view=rev
> Log:
> Add iterator_range::end() predicate.
Why is this required? I only ask because I was under the impression we
wanted to keep this interface as similar to what may be standardized
as possible, and I don't recall this as part of the current ranges
proposal. However, I could be wrong as I've not checked the proposal
in a while.
~Aaron
>
> Modified:
> llvm/trunk/include/llvm/ADT/iterator_range.h
>
> Modified: llvm/trunk/include/llvm/ADT/iterator_range.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator_range.h?rev=248447&r1=248446&r2=248447&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/iterator_range.h (original)
> +++ llvm/trunk/include/llvm/ADT/iterator_range.h Wed Sep 23 18:58:29 2015
> @@ -45,6 +45,7 @@ public:
>
> IteratorT begin() const { return begin_iterator; }
> IteratorT end() const { return end_iterator; }
> + bool empty() const { return begin_iterator == end_iterator; }
> };
>
> /// \brief Convenience function for iterating over sub-ranges.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list