[llvm-bugs] [Bug 44376] Iterator-based for-loop destroys the iterated object before the loop ends

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 24 13:01:49 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44376

David Blaikie <dblaikie at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dblaikie at gmail.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from David Blaikie <dblaikie at gmail.com> ---
Unfortunately, while it would be nice if that were the case, it's not how the
language is specified.

https://en.cppreference.com/w/cpp/language/range-for has some discussion on
this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191224/27de5984/attachment.html>


More information about the llvm-bugs mailing list