220 11799 <6F4B3C72-9962-48DC-8527-0C89EA1B9710@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N4078: Rvalue reference overloads for value()
 method returns object by value
Date: Thu, 10 Jul 2014 17:03:02 +0800
Lines: 74
Approved: news@gmane.org
Message-ID: <6F4B3C72-9962-48DC-8527-0C89EA1B9710@gmail.com>
References: <b538efba-faf4-4ffc-a553-302b9d2ba2c0@isocpp.org> <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com> <4DA018C3-2327-4F55-B7F8-7988EC7B789A@gmail.com> <1a858a77-310b-4591-aaf5-960c40d9f5fc@isocpp.org> <66AF41C1-CB37-4311-98EA-D47DBC6068DC@gmail.com> <66c38b61-7a95-4ace-b34f-2346bb334fb9@isocpp.org> <F1CBA358-0AD8-4ADD-99DA-6D00FCFE150F@gmail.com> <CAFk2RUZENmaMW5NwBaiF6byfhgRyPUsSmuyVjnRDhbjcfaTtQA@mail.gmail.com> <CC03CC1C-8487-40C8-97DF-2CA7661DAD55@gmail.com> <CAFk2RUa7-WTcL=XFYO8KMyU4rdpjDEfFM6n6SkUZ=SW_U7s5XQ@mail.gmail.com> <EF930317-EB97-402E-A3A0-CC46E7E2D998@gmail.com> <CAFk2RUZigiwLwFpfVXuFS8cqy38hPG3OGhGUi+iNwSYuYvyAyQ@mail.gmail.com> <A46ADDB4-C9B0-4163-81BE-900CD879D8C8@gmail.com> <CAFk2RUZ-DqEcMeehjH8KedYgErxKMq4O9kmeN4FZzjkXMYSsiw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_6A25EAEC-9D24-4957-B612-65B9F7117840"
X-Trace: ger.gmane.org 1404982999 7647 80.91.229.3 (10 Jul 2014 09:03:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 10 Jul 2014 09:03:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBTNN7GOQKGQEP6DBNFQ@isocpp.org Thu Jul 10 11:03:12 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBTNN7GOQKGQEP6DBNFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBTNN7GOQKGQEP6DBNFQ@isocpp.org>)
	id 1X5AFz-0007dd-05
	for gclcip-std-proposals@m.gmane.org; Thu, 10 Jul 2014 11:03:11 +0200
Original-Received: by mail-ob0-f200.google.com with SMTP id nu7sf7156529obb.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 10 Jul 2014 02:03:10 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :references:to:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=qkD81pd9TDJOfFtCJWrCRvilBIn0zqdtCf7leMkZLAs=;
        b=gZooZU2B3HItxTuHciupTa7WjTTsKCOTrBokVRQcbmaW/n1i7mzifSGA13IcxAX3sG
         mxwB7c0ET7Eg5ka2KfUbTnwFEw5BtqmuxiS53Khwxf9WUQ2viEN8cpGKr+GgrnQRhJGT
         xbzntE14kSDCZt74HhLRwdxdkxNEbZ3Nb35qnr8FBvg8iFcTd6VXzIbxC+o7WW16RvQ7
         YHZFUDbvmTIEU7WF5Ae1iaLH1s19gq72n/Rj4mz4+0Os8qxyLnZT+eES/RKlGMLV24QP
         WB9lkZx/ImYO/nnj3I+11f5W4u6eNVnAbvM1CXZAQFj+NbfmYvv4/NwB+twLKrDB4qKK
         TJMw==
X-Gm-Message-State: ALoCoQmk7Ihz8AbssOaC+sCelmf8n0srSy+KZeHU0vo5xhqKTNsl4sFxsWzl2uLjlqr6PAUro9VR
X-Received: by 10.50.171.134 with SMTP id au6mr6906046igc.7.1404982990063;
        Thu, 10 Jul 2014 02:03:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.79.195 with SMTP id l3ls1332008igx.31.canary; Thu, 10 Jul
 2014 02:03:09 -0700 (PDT)
X-Received: by 10.50.23.16 with SMTP id i16mr19794140igf.24.1404982989399;
        Thu, 10 Jul 2014 02:03:09 -0700 (PDT)
Original-Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [2607:f8b0:4001:c05::22b])
        by mx.google.com with ESMTPS id d14si24278356icn.44.2014.07.10.02.03.09
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 10 Jul 2014 02:03:09 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:4001:c05::22b as permitted sender) client-ip=2607:f8b0:4001:c05::22b;
Original-Received: by mail-ig0-f171.google.com with SMTP id l13so2446742iga.4
        for <std-proposals@isocpp.org>; Thu, 10 Jul 2014 02:03:09 -0700 (PDT)
X-Received: by 10.50.60.41 with SMTP id e9mr20238392igr.11.1404982989245;
        Thu, 10 Jul 2014 02:03:09 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.43])
        by mx.google.com with ESMTPSA id q11sm23409808igr.7.2014.07.10.02.03.06
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 10 Jul 2014 02:03:08 -0700 (PDT)
In-Reply-To: <CAFk2RUZ-DqEcMeehjH8KedYgErxKMq4O9kmeN4FZzjkXMYSsiw@mail.gmail.com>
X-Mailer: Apple Mail (2.1878.6)
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:4001:c05::22b as permitted
 sender) smtp.mail=potswa@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11799
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11799>

--Apple-Mail=_6A25EAEC-9D24-4957-B612-65B9F7117840
Content-Type: text/plain; charset=ISO-8859-1


On 2014-07-10, at 5:01 PM, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:

> On 10 July 2014 11:58, David Krauss <potswa@gmail.com> wrote:
>> Risky micro-optimization should never be the default. If
> 
> It's not a micro-optimization.

Eliminating one move is a micro-optimization.

>> forward-by-reference returns are sometimes desired for performance, then add
>> them under a function name like forward_*() or provide a suitable additional
>> sibling to std::forward() to handle such cases. Do not foist the hack on
>> everyone.
> 
> The standard library already "foists the hack" on everyone. For,
> apparently, good
> reasons.

In exactly one function? std::get does not count separately for each overload, sorry. This does not set much of a precedent.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--Apple-Mail=_6A25EAEC-9D24-4957-B612-65B9F7117840
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 2014&=
ndash;07&ndash;10, at 5:01 PM, Ville Voutilainen &lt;<a href=3D"mailto:vill=
e.voutilainen@gmail.com">ville.voutilainen@gmail.com</a>&gt; wrote:</div><b=
r class=3D"Apple-interchange-newline"><blockquote type=3D"cite">On 10 July =
2014 11:58, David Krauss &lt;<a href=3D"mailto:potswa@gmail.com">potswa@gma=
il.com</a>&gt; wrote:<br><blockquote type=3D"cite">Risky micro-optimization=
 should never be the default. If<br></blockquote><br>It's not a micro-optim=
ization.<br></blockquote><div><br></div><div>Eliminating one move is a micr=
o-optimization.</div><br><blockquote type=3D"cite"><blockquote type=3D"cite=
">forward-by-reference returns are sometimes desired for performance, then =
add<br>them under a function name like forward_*() or provide a suitable ad=
ditional<br>sibling to std::forward() to handle such cases. Do not foist th=
e hack on<br>everyone.<br></blockquote><br>The standard library already "fo=
ists the hack" on everyone. For,<br>apparently, good<br>reasons.<br></block=
quote><div><br></div>In exactly one function? <font face=3D"Courier">std::g=
et</font> does not count separately for each overload, sorry. This does not=
 set much of a precedent.<br></div><div><br></div></body></html>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_6A25EAEC-9D24-4957-B612-65B9F7117840--

.
