220 6755 <47b487e0-390d-448e-818e-1f43ab4b0db9@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Mikhail Semenov <mikhailsemenov1957@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 00:36:38 -0700 (PDT)
Lines: 147
Approved: news@gmane.org
Message-ID: <47b487e0-390d-448e-818e-1f43ab4b0db9@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_1277_2243154.1380440198531"
X-Trace: ger.gmane.org 1380440198 529 80.91.229.3 (29 Sep 2013 07:36:38 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 29 Sep 2013 07:36:38 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDC55PNFRYGRBCFRT6JAKGQE6J3RTKQ@isocpp.org Sun Sep 29 09:36:43 2013
Return-path: <std-proposals+bncBDC55PNFRYGRBCFRT6JAKGQE6J3RTKQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDC55PNFRYGRBCFRT6JAKGQE6J3RTKQ@isocpp.org>)
	id 1VQBYY-0004jX-AD
	for gclcip-std-proposals@m.gmane.org; Sun, 29 Sep 2013 09:36:42 +0200
Original-Received: by mail-ie0-f199.google.com with SMTP id e14sf15012663iej.10
        for <gclcip-std-proposals@m.gmane.org>; Sun, 29 Sep 2013 00:36:41 -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=jNVqHhvDxbrdUIm4AMuX+fpZLYJT8ulcIXXFyEpQxLk=;
        b=o52pRR1149TGY3rdFHTd5Jj2m6tJW0IJ4nzwYybguW4UQ7HG9U/Ffq3gcLbyXjkoic
         iU1Hgg1+v6lTMawiXj7/OEdpRbg8rkg71i/8sw2qbOzonNg40YOxBK31BgHuTFiactV+
         o5ZxERAHO7gmkJLOloVf0h1nBq1CflZHNshSod2VURwbAXcb2Sg3TOVD+ijih3rgKwwV
         OZZfAqTSUNLiUS8qx9wYDDm6INt6TUW+alkN1NP9QPTPG2k9S+sKkGDG8p24y+B//Zbx
         IRaztZbsDGFKZ2NGxoA3ZARINoQ7oaVWNArQMIeH0Otw6CiARB0P9IIkaOVLqIxNeeSm
         f6eA==
X-Received: by 10.43.61.211 with SMTP id wx19mr10237238icb.17.1380440201285;
        Sun, 29 Sep 2013 00:36:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.1.68 with SMTP id 4ls1183564igk.22.canary; Sun, 29 Sep 2013
 00:36:40 -0700 (PDT)
X-Received: by 10.50.109.170 with SMTP id ht10mr325184igb.14.1380440200396;
        Sun, 29 Sep 2013 00:36:40 -0700 (PDT)
In-Reply-To: <CANh-dXnis=-E_PvEz4L+RAHmz5aqcnKZqqYfhwX0WM0vSC9MKw@mail.gmail.com>
X-Original-Sender: mikhailsemenov1957@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:6755
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6755>

------=_Part_1277_2243154.1380440198531
Content-Type: text/plain; charset=ISO-8859-1

It can be done even better:
*#define memb_delegate(_a, _f)\*
*  [&(_a)](auto&& ... _args) { return 
(_a)._f(std::forward<decltype(_args)>(_args)...);}* 
 
This can be used like this:
*double r = integrate(member_delegate(a, fa),  x1, x2, y1, y2, z1, z2, a1, 
a2, b1, b2);*
 
(I haven't compiled it either).
 
I works with various parameters. 
 
I have mentioned it a couple of times during discussions.
 
By the way, I don't have access to twiki and failed to register.
 
 

On Sunday, September 29, 2013 5:26:18 AM UTC+1, Jeffrey Yasskin wrote:

> Thanks for the proposals. The Library Evolution group in Chicago 
> reviewed mem_fn and concluded that it's generally not worth extending 
> the callable wrappers, and that users should just use lambdas in 
> nearly all cases. C++14's generic lambdas with variadic captures make 
> this an even better tradeoff (note, I didn't compile this): 
>
>  double r = integrate 
>               ([&a](const auto&... args) { return a.fa(args...);}, 
>                  x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); 
>
> http://wiki.edg.com/twiki/bin/view/Wg21chicago2013/N3702 
>
> On Thu, Sep 26, 2013 at 2:42 PM, Mikhail Semenov 
> <mikhailse...@gmail.com <javascript:>> wrote: 
> > Revised proposal: support for a unique pointer and reference wrapper as 
> a 
> > second parameter is added, including a reference to a shared pointer. 
> The 
> > second parameter is move-constructible. 
> > 
> > 
> > -- 
> > 
> > --- 
> > 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-proposal...@isocpp.org <javascript:>. 
> > To post to this group, send email to std-pr...@isocpp.org <javascript:>. 
>
> > Visit this group at 
> > http://groups.google.com/a/isocpp.org/group/std-proposals/. 
>

-- 

--- 
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/.

------=_Part_1277_2243154.1380440198531
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>It can be done even better:</div><div><strong>#define=
 memb_delegate(_a, _f)\</strong></div><div><strong>&nbsp; [&amp;(_a)](auto&=
amp;&amp; ... _args) { return (_a)._f(std::forward&lt;decltype(_args)&gt;(_=
args)...);}</strong> </div><div>&nbsp;</div><div>This can be used like this=
:</div><div><strong>double r =3D integrate(member_delegate(a, fa),&nbsp; x1=
, x2, y1, y2, z1, z2, a1, a2, b1, b2);</strong></div><div>&nbsp;</div><div>=
(I haven't compiled it either).</div><div>&nbsp;</div><div>I works with var=
ious parameters. </div><div>&nbsp;</div><div>I have mentioned it a couple o=
f times during discussions.</div><div>&nbsp;</div><div>By the way, I don't =
have access to twiki and failed to register.</div><div>&nbsp;</div><div>&nb=
sp;</div><div><br>On Sunday, September 29, 2013 5:26:18 AM UTC+1, Jeffrey Y=
asskin wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0=
px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bor=
der-left-width: 1px; border-left-style: solid;">Thanks for the proposals. T=
he 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><a href=3D"http://wiki.edg.com/twiki/bin/view/Wg21chicago2013/N3702" ta=
rget=3D"_blank">http://wiki.edg.com/twiki/bin/<wbr>view/Wg21chicago2013/N37=
02</a>
<br>
<br>On Thu, Sep 26, 2013 at 2:42 PM, Mikhail Semenov
<br>&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
19bXdx5Ta8AJ">mikhailse...@gmail.com</a>&gt; wrote:
<br>&gt; Revised proposal: support for a unique pointer and reference wrapp=
er as a
<br>&gt; second parameter is added, including a reference to a shared point=
er. The
<br>&gt; second parameter is move-constructible.
<br>&gt;
<br>&gt;
<br>&gt; --
<br>&gt;
<br>&gt; ---
<br>&gt; You received this message because you are subscribed to the Google=
 Groups
<br>&gt; "ISO C++ Standard - Future Proposals" group.
<br>&gt; To unsubscribe from this group and stop receiving emails from it, =
send an
<br>&gt; email to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-=
mailto=3D"19bXdx5Ta8AJ">std-proposal...@<wbr>isocpp.org</a>.
<br>&gt; To post to this group, send email to <a href=3D"javascript:" targe=
t=3D"_blank" gdf-obfuscated-mailto=3D"19bXdx5Ta8AJ">std-pr...@isocpp.org</a=
>.
<br>&gt; Visit this group at
<br>&gt; <a href=3D"http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/" target=3D"_blank">http://groups.google.com/a/<wbr>isocpp.org/group/std=
-<wbr>proposals/</a>.
<br></blockquote></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_1277_2243154.1380440198531--

.
