[llvm-bugs] [Bug 26189] Optimization bug with member function return a rvalue in a class template
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 18 12:10:59 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26189
David Blaikie <dblaikie at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |dblaikie at gmail.com
Resolution|--- |INVALID
--- Comment #1 from David Blaikie <dblaikie at gmail.com> ---
get_and_erase invokes UB by returning a reference to a local object
What you probably want is to return by value from get_and_erase, not by (albeit
rvalue) reference.
--
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/20160118/9e8c1db8/attachment.html>
More information about the llvm-bugs
mailing list