This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61597] Unexpected behavior at runtime
- From: "adrien.hamelin+gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2014 08:22:28 +0000
- Subject: [Bug c++/61597] Unexpected behavior at runtime
- Auto-submitted: auto-generated
- References: <bug-61597-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Adrien Hamelin <adrien.hamelin+gcc at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #33000|0 |1
is obsolete| |
--- Comment #8 from Adrien Hamelin <adrien.hamelin+gcc at gmail dot com> ---
Created attachment 33002
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33002&action=edit
Preprocessed file
Effectively the problem can be showed with much less code lines. I just did a
custom iterator to show the problem (and removed my own array).
The problem comes from line 45. If the function takes a copy, it does not work
but if it takes a reference and do the copy inside (as shown line 52) it does
work.
Once again it works fine with Visual 2013.
The new code : http://coliru.stacked-crooked.com/a/e33afe532e7f1e55