[PATCH] D25124: Support rvalue references in enumerate range adapter.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 23:12:26 PDT 2016


There's already an lvalue mutation test (see context above this diff). Is
rvalue mutation useful? I imagine it already works, I just didn't think to
test it because there wasn't an obvious use case
On Fri, Sep 30, 2016 at 11:09 PM Chandler Carruth <chandlerc at gmail.com>
wrote:

> chandlerc added a comment.
>
> Add a test showing mutation? Specifically that the range can be mutated
> even when a temporary is used, and that when an L-value is used the
> mutation mutates the underlying object rather than a copy (either of the
> element or the container).
>
>
>
> > STLExtrasTest.cpp:169
> > +  Copies = Moves = Destructors = 0;
> > +  // With an lvalue, it should not be destroyed even after the end of
> the scope.
> > +  // lvalue ranges need be neither copyable nor moveable.
>
> 80-columns?
>
> https://reviews.llvm.org/D25124
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161001/3b09b659/attachment.html>


More information about the llvm-commits mailing list