220 6762 <a15d9ee3-a062-4309-9798-21203e5c2280@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: tomaszkam@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Revision of N3702: Introducing an optional
 parameter for mem_fn.
Date: Sun, 29 Sep 2013 05:17:56 -0700 (PDT)
Lines: 92
Approved: news@gmane.org
Message-ID: <a15d9ee3-a062-4309-9798-21203e5c2280@isocpp.org>
References: <f0fa2e29-b024-4fa9-a12c-99d3f8599461@isocpp.org>
 <d92e0d83-366a-4ef0-8df2-c17994ab0755@isocpp.org> <0ffade3d-ac13-434c-b20a-85d611783fc1@isocpp.org>
 <2284c2d2-ec8e-43fb-90e7-c43ac9dc92c2@isocpp.org> <505813ae-956c-4693-b793-2ba47107c09c@isocpp.org>
 <CANh-dXnis=-E_PvEz4L+RAHmz5aqcnKZqqYfhwX0WM0vSC9MKw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_89_22566674.1380457076201"
X-Trace: ger.gmane.org 1380457076 29876 80.91.229.3 (29 Sep 2013 12:17:56 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 29 Sep 2013 12:17:56 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDNPVXXG6IGBB5NUUCJAKGQE3SRQKUY@isocpp.org Sun Sep 29 14:18:00 2013
Return-path: <std-proposals+bncBDNPVXXG6IGBB5NUUCJAKGQE3SRQKUY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f198.google.com ([209.85.214.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDNPVXXG6IGBB5NUUCJAKGQE3SRQKUY@isocpp.org>)
	id 1VQFwl-0001aa-4o
	for gclcip-std-proposals@m.gmane.org; Sun, 29 Sep 2013 14:17:59 +0200
Original-Received: by mail-ob0-f198.google.com with SMTP id uy5sf17357906obc.9
        for <gclcip-std-proposals@m.gmane.org>; Sun, 29 Sep 2013 05:17:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=RMDNdONjHcV9sKCNsmFLMxkJa16T1XpBdt9Z+HspHKQ=;
        b=RySWqytk+VZshwzVrgjGVTg26Ryvb3Oe9uKwq/jss+9TY2lzj2DFizkRwQHCR8wAsm
         d2vvuHr+DxNr/kW8EKOsN70sv6yVSHVCgsJNemTgODCy3VeyCSZvZVx4SnOl+NZPGrz6
         sGnQRZCqV5Q3Ly4jcU4yH1k0xDVavkamLspVAbcnokM3+Uca5LUMV+y2wsJm+yF8azPC
         YeKuktOCdg9pusLVTpKPZNLQ/C/ysd685uH/zNtDpFkLIwyhRnupAtVuuT58z2RkuhhY
         v/XsOUUOEWJU5u7VJS3jbeQAfiO2PQU56WklYyT7uxUaltWXSLUjsQlcx6clPSP3ygEq
         58hg==
X-Received: by 10.43.65.81 with SMTP id xl17mr10379777icb.29.1380457078120;
        Sun, 29 Sep 2013 05:17:58 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.33.45 with SMTP id o13ls1352132igi.17.canary; Sun, 29 Sep
 2013 05:17:57 -0700 (PDT)
X-Received: by 10.50.11.16 with SMTP id m16mr297930igb.0.1380457077685;
        Sun, 29 Sep 2013 05:17:57 -0700 (PDT)
In-Reply-To: <CANh-dXnis=-E_PvEz4L+RAHmz5aqcnKZqqYfhwX0WM0vSC9MKw@mail.gmail.com>
X-Original-Sender: tomaszkam@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:6762
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6762>

------=_Part_89_22566674.1380457076201
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable



W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+2 u=BFytkownik Jeffrey=20
Yasskin napisa=B3:
>
> Thanks for the proposals. The Library Evolution group in Chicago=20
> reviewed mem_fn and concluded that it's generally not worth extending=20
> the callable wrappers, and that users should just use lambdas in=20
> nearly all cases. C++14's generic lambdas with variadic captures make=20
> this an even better tradeoff (note, I didn't compile this):=20
>
>  double r =3D integrate=20
>               ([&a](const auto&... args) { return a.fa(args...);},=20
>                  x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);=20
>
> To work with any parameter/return (references) type combination, this=20
should be written as:
 double r =3D integrate(
              [&a](auto&&... args) -> decltype(auto)
              { return a.fa(std::forward<decltype(auto)>(args)...); });

Which is pretty less readable and less intent clear than:
 double r =3D integrate(std::mem_fn(&A::a, std::ref(a)));

In my opinion the deifference between this 2 cases may be compared with the=
=20
diference between using
hand-writtern loop versus algorithm.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_89_22566674.1380457076201
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+=
2 u=BFytkownik Jeffrey Yasskin napisa=B3:<blockquote class=3D"gmail_quote" =
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-l=
eft: 1ex;">Thanks for the proposals. The Library Evolution group in Chicago
<br>reviewed mem_fn and concluded that it's generally not worth extending
<br>the callable wrappers, and that users should just use lambdas in
<br>nearly all cases. C++14's generic lambdas with variadic captures make
<br>this an even better tradeoff (note, I didn't compile this):
<br>
<br>&nbsp;double r =3D integrate
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ([&amp;a](const auto&a=
mp;... args) { return a.fa(args...);},
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x1, x2, y=
1, y2, z1, z2, a1, a2, b1, b2);
<br>
<br></blockquote><div>To work with any parameter/return (references) type c=
ombination, this should be written as:<br><span style=3D"font-family: couri=
er new,monospace;">&nbsp;double r =3D integrate(<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&amp;a](auto&amp;&=
amp;... args) -&gt; decltype(auto)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; { return a.fa(std::forward&lt;decltype(auto)&gt;(args)...); });=
</span><br><br>Which is pretty less readable and less intent clear than:<br=
><span style=3D"font-family: courier new,monospace;">&nbsp;double r =3D int=
egrate(std::mem_fn(&amp;A::a, std::ref(a)));<br><br><font face=3D"arial,san=
s-serif">In my opinion the deifference between this 2 cases may be compared=
 with the diference between using<br>hand-writtern loop versus algorithm.<b=
r></font></span></div></div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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 />

------=_Part_89_22566674.1380457076201--

.
