220 21055 <074f49c2-454c-4524-a6ec-e471e6c3ac60@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Adding library support for recursive lambdas
Date: Wed, 30 Sep 2015 11:35:37 -0700 (PDT)
Lines: 75
Approved: news@gmane.org
Message-ID: <074f49c2-454c-4524-a6ec-e471e6c3ac60@isocpp.org>
References: <0d59ccd2-4156-4c25-90eb-d23990258ec4@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_693_1424448224.1443638138010"
X-Trace: ger.gmane.org 1443638144 14219 80.91.229.3 (30 Sep 2015 18:35:44 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 30 Sep 2015 18:35:44 +0000 (UTC)
Cc: yegor.derevenets@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBB66WWCYAKGQECSRIT7Q@isocpp.org Wed Sep 30 20:35:43 2015
Return-path: <std-proposals+bncBCEKFTV6ZUMBB66WWCYAKGQECSRIT7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f69.google.com ([209.85.218.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBB66WWCYAKGQECSRIT7Q@isocpp.org>)
	id 1ZhME9-0002Ka-7p
	for gclcip-std-proposals@m.gmane.org; Wed, 30 Sep 2015 20:35:41 +0200
Original-Received: by oiev17 with SMTP id v17sf69953983oie.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 30 Sep 2015 11:35:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:content-type:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=al7222zcyWXYpMOxfMn1a5utugIlPBKmc7Bi2e6jjWY=;
        b=oZFk5k9s6m+Y1DiHe4oqZxv4iQRHVBLkRCBIigBMsuBR5HjhvKLqkJOnvrjs4xtZ2h
         zQXw8/ZioYxEn6b9OJ635n98AhAo8Md5drHL5ngQ+tBn+ZX5fskyEyCfuVOob3tdFEor
         rFXB1pVODlIqZY4WguELX4HgH5sI2oohxyFgbxqTel07oWDasAhly8D5sXlfKjWKDmon
         NTKrsK9r6UPIk99OgfwT+p6Bv5AfKdb4z5INwh5hTHt6nHWMgctTy85dOL2wG64nQfla
         RHbac02cNNO3fmRmmBbMLUvUF5Gq8poRYiW+WhUJlFdNg3z6gxvItFgAFr2F7J1nIQlV
         c7VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:content-type:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=al7222zcyWXYpMOxfMn1a5utugIlPBKmc7Bi2e6jjWY=;
        b=GdjIxGC750dSpHw1gDAZY+tgawKRWsw0pemG+z12qDq07dBtkQ/cGDETPkmxhg2Urr
         nJQpA04FM5BPIjUYS0xY50rQ2kCYecGurPLUNIEfttYKh3mK+eJ+EI1nS0ZaQgH2MZpC
         goH1V7Bf2Mn5+tWS+cYCVHoTI4jfgOy0XJz3iqMg7VHfmYNfP38qNwRqGpDqSUmApuER
         56IjOaOtXZP3Lq8DPQpVmaBWFwEuLIFK5GXYNS2Y3kExLJQXkS+Q7q1js+dlcVcZ1V28
         pK6akojfKWC67jgjmUJe6Gz60gIvOhORmJahdmMUMsjz3x37RyJt7KlsInWMrKh5nJVo
         Ejdg==
X-Gm-Message-State: ALoCoQmNf3hdykK9OML/o5b2Rx/R4ZGmXd1KCrbcEVpoCFcmpCJFcwHO4BH+ZZC7/JyhnSR+AfVW
X-Received: by 10.182.24.9 with SMTP id q9mr4688632obf.13.1443638140222;
        Wed, 30 Sep 2015 11:35:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.7.210 with SMTP id g79ls385842ioi.40.gmail; Wed, 30 Sep
 2015 11:35:38 -0700 (PDT)
X-Received: by 10.50.136.163 with SMTP id qb3mr359076igb.12.1443638138907;
        Wed, 30 Sep 2015 11:35:38 -0700 (PDT)
In-Reply-To: <0d59ccd2-4156-4c25-90eb-d23990258ec4@isocpp.org>
X-Original-Sender: jmckesson@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:21055
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21055>

------=_Part_693_1424448224.1443638138010
Content-Type: multipart/alternative; 
	boundary="----=_Part_694_758126977.1443638138010"

------=_Part_694_758126977.1443638138010
Content-Type: text/plain; charset=UTF-8

In the Design Decisions section, it claims that `y_wrapper` would have the 
ability to store a value or reference, depending on a template parameter. 
By default it stores a value, but if you construct one yourself, it can 
store a reference.

That doesn't seem feasible, not in the intended use case. Remember that 
lambda functions have a name, but they are untypeable. Calling `std::y` (a 
terrible function name, BTW) uses template argument deduction to figure out 
what the lambda's type is. But there's no such thing as template argument 
deduction when instantiating a template class like `y_wrapper`. So... how 
do you do this:

auto fib = y_wrapper<???, use_reference>([]...);

What goes in the ??? part?

-- 

--- 
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_694_758126977.1443638138010
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">In the Design Decisions section, it claims that `y_wrapper=
` would have the ability to store a value or reference, depending on a temp=
late parameter. By default it stores a value, but if you construct one your=
self, it can store a reference.<br><br>That doesn&#39;t seem feasible, not =
in the intended use case. Remember that lambda functions have a name, but t=
hey are untypeable. Calling `std::y` (a terrible function name, BTW) uses t=
emplate argument deduction to figure out what the lambda&#39;s type is. But=
 there&#39;s no such thing as template argument deduction when instantiatin=
g a template class like `y_wrapper`. So... how do you do this:<br><br><div =
class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); border=
-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wr=
ap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint">=
<span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> fib </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> y_wrapper</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&lt;???,</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> use_reference</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&gt;([]...);</span></div></code><=
/div><br>What goes in the ??? part?<br></div>

<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 />

------=_Part_694_758126977.1443638138010--
------=_Part_693_1424448224.1443638138010--

.
