1 Return-Path: <kimminh.kaplan+nomuch@afnic.fr>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 56C36431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 29 Apr 2013 23:12:44 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id oQs7eRCGF0Ds for <notmuch@notmuchmail.org>;
\r
16 Mon, 29 Apr 2013 23:12:39 -0700 (PDT)
\r
17 Received: from mx4.nic.fr (mx4.nic.fr [192.134.4.12])
\r
18 by olra.theworths.org (Postfix) with ESMTP id B8DB7431FAF
\r
19 for <notmuch@notmuchmail.org>; Mon, 29 Apr 2013 23:12:39 -0700 (PDT)
\r
20 Received: from mx4.nic.fr (localhost [127.0.0.1])
\r
21 by mx4.nic.fr (Postfix) with SMTP id 33540280785;
\r
22 Tue, 30 Apr 2013 08:12:37 +0200 (CEST)
\r
23 Received: from relay2.nic.fr (relay2.nic.fr [192.134.4.163])
\r
24 by mx4.nic.fr (Postfix) with ESMTP id 2E82028072C;
\r
25 Tue, 30 Apr 2013 08:12:37 +0200 (CEST)
\r
26 Received: from kaki.tech.prive.nic.fr (kaki.tech.prive.sqy.nic.fr
\r
27 [10.10.86.114]) by relay2.nic.fr (Postfix) with ESMTP id 2CF2DB38055;
\r
28 Tue, 30 Apr 2013 08:12:07 +0200 (CEST)
\r
29 Received: by kaki.tech.prive.nic.fr (Postfix, from userid 1000)
\r
30 id 19A3C3F83CB; Tue, 30 Apr 2013 06:12:07 +0000 (UTC)
\r
31 From: Kim Minh Kaplan <kimminh.kaplan+nomuch@afnic.fr>
\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>
\r
33 Subject: Re: [PATCH] don't store temporary value returned from c_str()
\r
34 References: <1366405933-17223-1-git-send-email-Vladimir.Marek@oracle.com>
\r
35 <m2sj2cjp2b.fsf@guru.guru-group.fi>
\r
36 <20130427101134.GI10394@pub.cz.oracle.com>
\r
37 Date: Tue, 30 Apr 2013 06:12:06 +0000
\r
38 In-Reply-To: <20130427101134.GI10394@pub.cz.oracle.com> (Vladimir Marek's
\r
39 message of "Sat, 27 Apr 2013 12:11:35 +0200")
\r
40 Message-ID: <8761z4h7ih.fsf@kaki.tech.prive.nic.fr>
\r
41 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
\r
43 Content-Type: text/plain; charset=utf-8
\r
44 Content-Transfer-Encoding: quoted-printable
\r
45 Cc: notmuch@notmuchmail.org, Vladimir Marek <vlmarek@volny.cz>
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Tue, 30 Apr 2013 06:12:44 -0000
\r
60 Vladimir Marek writes:
\r
62 > Well, a) standards says that
\r
64 > A temporary bound to a reference parameter in a function call (5.2.2)
\r
65 > persists until the completion of the full expression containing the call
\r
67 > (you can find the message all over the net, but I can't find actual link
\r
68 > to the standard :-/)
\r
70 The january 2012 working draft:=20
\r
71 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf
\r
73 12.2 Temporary objects [class.temporary]
\r
75 1 Temporaries of class type are created in various contexts: binding a
\r
76 reference to a prvalue (8.5.3), returning a prvalue (6.6.3) [=E2=80=A6]
\r
78 3 When an implementation introduces a temporary object of a class that
\r
79 has a non-trivial constructor (12.1, 12.8), it shall ensure that a
\r
80 constructor is called for the temporary object. Similarly, the
\r
81 destructor shall be called for a temporary with a non-trivial destructor
\r
82 (12.4). Temporary objects are destroyed as the last step in evaluating
\r
83 the full-expression (1.9) that (lexically) contains the point where they
\r