This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37144] A bug in include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Dec 2008 15:41:55 -0000
- Subject: [Bug libstdc++/37144] A bug in include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
- References: <bug-37144-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from hjl dot tools at gmail dot com 2008-12-11 15:41 -------
(In reply to comment #13)
> Hi HJ: I'm not sure to understand, you mean this is actually a C++ / compiler
> bug?!?
>
I can't say if C++ standard requires
const_T1_reference
extract_key_imp(const_pair_reference r_val)
{ return r_val.first; }
creates a temporary and returns a reference to it. On the other
hand, I can't tell returning a reference to r_val.first directly will
cause any harm.
FWIW, icc 10.0 also creates a temporary and returns a reference to it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37144