From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24225 invoked by alias); 11 Dec 2008 15:43:18 -0000 Received: (qmail 24038 invoked by uid 48); 11 Dec 2008 15:41:55 -0000 Date: Thu, 11 Dec 2008 15:43:00 -0000 Message-ID: <20081211154155.24037.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/37144] A bug in include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01177.txt.bz2 ------- 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