220 25035 <a1af4744-b2eb-42ee-8460-bc6866b02c34@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Morwenn <morwenn29@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Lambdas in unevaluated contexts: a proposal
Date: Mon, 7 Mar 2016 13:03:40 -0800 (PST)
Lines: 95
Approved: news@gmane.org
Message-ID: <a1af4744-b2eb-42ee-8460-bc6866b02c34@isocpp.org>
References: <97f4407a-4965-41ab-bbbd-00cbf37f7588@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_633_1310372131.1457384620888"
X-Trace: ger.gmane.org 1457384644 4564 80.91.229.3 (7 Mar 2016 21:04:04 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 7 Mar 2016 21:04:04 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC2ZP4V74IFBBLWZ663AKGQEBWGCCMQ@isocpp.org Mon Mar 07 22:03:51 2016
Return-path: <std-proposals+bncBC2ZP4V74IFBBLWZ663AKGQEBWGCCMQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC2ZP4V74IFBBLWZ663AKGQEBWGCCMQ@isocpp.org>)
	id 1ad2Jc-0003sW-1X
	for gclcip-std-proposals@m.gmane.org; Mon, 07 Mar 2016 22:03:44 +0100
Original-Received: by mail-oi0-f70.google.com with SMTP id d205sf155067110oia.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 07 Mar 2016 13:03:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive:sender
         :list-subscribe:list-unsubscribe;
        bh=Rekz6zMxxIFFzSe8+K5DbGFxalpCjw0z+viPdvfuNgg=;
        b=gkt1vtfN5rYkugSYIYXLEJJhMJhbt4YjuP65fMTxGgNH4t0dKdxMdVkoBCeiZ7uS6i
         jfDFaRD75zAwkVWwwkBgcm2xBXvpq8OEh2t7omIb+Wgou+kC7/PJhTAmtSndNIrvWxNm
         /X7eOjn0ksaK4Zdl8pJWy5N4oelx/0kZ9fEbmcv17w3LiLZ3JHMZwJBKrLOlXibaVnos
         VWmlZBQdeCL4tXjGFWecpsR66SIjXF24NKJSuVtpafRH8cZskvLejZD8ptfxWcJ1VAEq
         S91seWKWDWek1u1psM3oMpZ1iTPJEM8EdEStZ4ZN5Dn2K2rb43dop/MTED2llzyECsUp
         P9Fg==
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
         :x-spam-checked-in-group:list-post:list-help:list-archive:sender
         :list-subscribe:list-unsubscribe;
        bh=Rekz6zMxxIFFzSe8+K5DbGFxalpCjw0z+viPdvfuNgg=;
        b=djtd7spE8q8r46GpVZjUpCx4Omj5FtOicctv11W8wZdV3vG3wYzIdVdDW2K41u6ykv
         PrEN6UZsyiLhBbCEngZ51ejpqAyqE1ai85dx5ZEo7gI2Ju+AlMkJBaHC613ShOqSnOap
         ZyFyIj2UHVgzI9XAbLk0Y72zT3rKRaKhv+QhdiaW0HKobguQFDT2vvGpNxzVqgYMV6wd
         DTKqoxXNRFnj4cCS1vCwgUymxZsv9K+X/LMN8Z2Y4hwJjfIWn79xbcWT/JDDe17bkxQO
         z/m8HX6A0Dgc488cn5BrfBwQehpiQoR7w6Zyg2gkrgHuQoc//wlLuhIhSxCIAO1/0aNQ
         nNdQ==
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:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:sender:list-subscribe:list-unsubscribe;
        bh=Rekz6zMxxIFFzSe8+K5DbGFxalpCjw0z+viPdvfuNgg=;
        b=BIPv+qTIC2fsurC/38DG2yfie/IQeqZuDpCbTdoCX73N93uqr0Hfxj9lCyjTFgtDVT
         fUrx/L8aKLxxZlsXvq9PgX42nSyyMc7uMHu9kZhXP4FBal+FdPSQ4sm+9zbudDjzx+Pq
         I2vh/7ewYMze7cXPacSt3d4U8i16OsUuINlBamZd+JsNIDXbqb0RzEgHM2oOPynP+3oD
         FN55vUdTmx9OZ0d+H8WMJuTKTo+UmDYd1qPoqAtBHi7BPqKXeWE2fiOCfBK78cZMvtCn
         +3DxpvCZI7A83mJpwYsLAM06O3J+99JvQoHQbsyNe+PYy/XCKcu+NpizDH18tXH8l41t
         SLFQ==
X-Gm-Message-State: AD7BkJLFyyj9ciPOfQkyZQfoVThGYBKbUnmqFaYTh35XjcNvZMSJhaRT9LCohJ30RtPOHQ==
X-Received: by 10.182.20.195 with SMTP id p3mr18824370obe.47.1457384623165;
        Mon, 07 Mar 2016 13:03:43 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.112.98 with SMTP id ip2ls1097444igb.27.canary; Mon, 07 Mar
 2016 13:03:41 -0800 (PST)
X-Received: by 10.50.18.42 with SMTP id t10mr103806igd.6.1457384621880;
        Mon, 07 Mar 2016 13:03:41 -0800 (PST)
In-Reply-To: <97f4407a-4965-41ab-bbbd-00cbf37f7588@isocpp.org>
X-Original-Sender: morwenn29@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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
Original-Sender: std-proposals@isocpp.org
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:25035
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25035>

------=_Part_633_1310372131.1457384620888
Content-Type: multipart/alternative; 
	boundary="----=_Part_634_593805798.1457384620888"

------=_Part_634_593805798.1457384620888
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

A few times I wished I could use lambdas in decltype to find the return=20
type of an ADL-found function:

using whatever_t =3D decltype([]{ using std::abs; return abs(foo); }());

It's not a clean way to do that, but the current solution of using an=20
adl_detail namespace to perform the same kind of trick isn't clan either.

Le lundi 7 mars 2016 17:13:07 UTC+1, Louis Dionne a =C3=A9crit :
>
> Hi,
>
> I have previously raised the issue of lambdas in unevaluated contexts on=
=20
> this list, and the
> conclusion seemed to be that the restriction was now obsolete. Hence, I=
=20
> have written a
> proposal to rectify the current situation.
>
> I attached the proposal to this message; it is only a draft and I welcome=
=20
> all constructive
> comments. My hope is that the paper can be discussed at Oulu, and perhaps=
=20
> even make
> it into C++17 in-extremis, given its small scope.
>
> Regards,
> Louis Dionne
>
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/a1af4744-b2eb-42ee-8460-bc6866b02c34%40isocpp.or=
g.

------=_Part_634_593805798.1457384620888
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">A few times I wished I could use lambdas in <span style=3D=
"font-family: courier new,monospace;">decltype</span> to find the return ty=
pe of an ADL-found function:<br><br><div style=3D"margin-left: 40px;"><span=
 style=3D"font-family: courier new,monospace;">using whatever_t =3D decltyp=
e([]{ using std::abs; return abs(foo); }());</span><br></div><br>It&#39;s n=
ot a clean way to do that, but the current solution of using an <span style=
=3D"font-family: courier new,monospace;">adl_detail</span> namespace to per=
form the same kind of trick isn&#39;t clan either.<br><br>Le lundi 7 mars 2=
016 17:13:07 UTC+1, Louis Dionne a =C3=A9crit=C2=A0:<blockquote class=3D"gm=
ail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc soli=
d;padding-left: 1ex;"><div dir=3D"ltr">Hi,<div><br></div><div>I have previo=
usly raised the issue of lambdas in unevaluated contexts on this list, and =
the</div><div>conclusion seemed to be that the restriction was now obsolete=
.. Hence, I have written a</div><div>proposal to rectify the current situati=
on.</div><div><br></div><div>I attached the proposal to this message; it is=
 only a draft and I welcome all constructive</div><div>comments. My hope is=
 that the paper can be discussed at Oulu, and perhaps even make</div><div>i=
t into C++17 in-extremis, given its small scope.</div><div><br></div><div>R=
egards,</div><div>Louis Dionne</div><div><br></div></div></blockquote></div=
>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/a1af4744-b2eb-42ee-8460-bc6866b02c34%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a1af4744-b2eb-42ee-8460-bc6866b02c34=
%40isocpp.org</a>.<br />

------=_Part_634_593805798.1457384620888--
------=_Part_633_1310372131.1457384620888--

.
