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

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 23:09:04 PDT 2016


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





More information about the llvm-commits mailing list