This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/37144] A bug in include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]