220 1691 <CAGNvRgCOdrYy8kRKtq4n00-G8zFUg2pBwEQL_yYbP-YYEcjHeQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals,gmane.comp.lang.c++.isocpp.general
Subject: Re: [std-discussion] Re: An implementation of Generic
 lambdas (Request for feedback)
Date: Sat, 12 Jan 2013 12:52:51 +0100
Lines: 27
Approved: news@gmane.org
Message-ID: <CAGNvRgCOdrYy8kRKtq4n00-G8zFUg2pBwEQL_yYbP-YYEcjHeQ@mail.gmail.com>
References: <CABsSThq8V7_T8d37axi6fgQm_EbvfSMPqj5_Uj0sk00qVWPO6A@mail.gmail.com>
	<ffceb930-4f81-4e9c-a482-7bea6a8e8ecc@isocpp.org>
	<CABsSThqtS-UAodW1KKLh-TZw1EuNyOUO1+it4SN9eNOpJwkyhw@mail.gmail.com>
	<CAK8e7Jx_9uHJ_3Bd+kQse8kukM4pQNzWDmTcAfvMs_kj12MDuw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1357991577 28567 80.91.229.3 (12 Jan 2013 11:52:57 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 12 Jan 2013 11:52:57 +0000 (UTC)
Cc: faisalv@gmail.com, std-proposals@isocpp.org
To: std-discussion@isocpp.org
Original-X-From: std-proposals+bncBCT7RVFA4QORBFE5YWDQKGQERB66RVI@isocpp.org Sat Jan 12 12:53:14 2013
Return-path: <std-proposals+bncBCT7RVFA4QORBFE5YWDQKGQERB66RVI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f69.google.com ([74.125.82.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCT7RVFA4QORBFE5YWDQKGQERB66RVI@isocpp.org>)
	id 1Ttze8-000886-I8
	for gclcip-std-proposals@m.gmane.org; Sat, 12 Jan 2013 12:53:08 +0100
Original-Received: by mail-wg0-f69.google.com with SMTP id es5sf2346559wgb.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 12 Jan 2013 03:52:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=EO3ANh2UVck6PRpiT7L6IALJK72usE1vSf+xW+EoTdA=;
        b=zr58phof/j3lq+q5chQUu5+5UMSCXgMqP0MSfDuTSgcY307gdQNu6tgLVtBwjyw7hm
         6pra0dhL853W1Orw1nbqEfRJUjww68688Lp17Vo15xgKn6OJ7kWurHUsGt8U0IDFXd0D
         oy/zVAoBMpGzdAJQpl92om3Rih1BZSg10P6Wq15IiPKBZkGgX+PKrgGI5YEuFXA9H1fj
         m5fAhN7UyVrKdtFw1HvadoKE8gSS9ofiF+Jc74JPigFQ2JJa6ErUKpnvIo7GU6kScQYy
         IevKqbSizdlCIQgzbsdp1CJnfEKtzumJvnuSVmfQjTD8rZdKaOEnrjUKhMsp4m0Czmz 
X-Received: by 10.180.91.114 with SMTP id cd18mr473222wib.2.1357991572478;
        Sat, 12 Jan 2013 03:52:52 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.90.204 with SMTP id by12ls597694wib.22.canary; Sat, 12 Jan
 2013 03:52:52 -0800 (PST)
X-Received: by 10.194.87.200 with SMTP id ba8mr126082900wjb.22.1357991572159;
        Sat, 12 Jan 2013 03:52:52 -0800 (PST)
X-Received: by 10.194.87.200 with SMTP id ba8mr126082870wjb.22.1357991571593;
        Sat, 12 Jan 2013 03:52:51 -0800 (PST)
Original-Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45])
        by mx.google.com with ESMTPS id ew20si3572704wid.41.2013.01.12.03.52.51
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 12 Jan 2013 03:52:51 -0800 (PST)
Received-SPF: pass (google.com: domain of daniel.kruegler@gmail.com designates 74.125.82.45 as permitted sender) client-ip=74.125.82.45;
Original-Received: by mail-wg0-f45.google.com with SMTP id dq12so1216978wgb.0
        for <multiple recipients>; Sat, 12 Jan 2013 03:52:51 -0800 (PST)
Original-Received: by 10.180.19.99 with SMTP id d3mr3702814wie.4.1357991571474; Sat, 12
 Jan 2013 03:52:51 -0800 (PST)
Original-Received: by 10.217.70.74 with HTTP; Sat, 12 Jan 2013 03:52:51 -0800 (PST)
In-Reply-To: <CAK8e7Jx_9uHJ_3Bd+kQse8kukM4pQNzWDmTcAfvMs_kj12MDuw@mail.gmail.com>
X-Original-Sender: daniel.kruegler@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of daniel.kruegler@gmail.com designates 74.125.82.45 as permitted
 sender) smtp.mail=daniel.kruegler@gmail.com;       dkim=pass header.i=@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:1691 gmane.comp.lang.c++.isocpp.general:625
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/1691>

2013/1/12 Andrea Proli <andy.prowl@gmail.com>:
> I was used to think of lambdas as syntactic sugar, but *generic* lambdas are
> not: the generated closure breaks the rule from paragraph 14/2:
>
> "A template-declaration can appear only as a namespace scope or class scope
> declaration".
>
> I am unaware of the reasons why this restriction exists in the first place
> (I did some research but with no success), so I cannot write a proposal on
> lifting it. However, if good reasons exist, I am curious whether the fact
> that generic lambdas break it will create troubles.

Polymorphic (or generic, if you prefer) lambda expressions don't
provide the full capacities of templates. As you say, they just are
syntactic sugar for some sub-space of possible template constructions.
It is therefore much simpler to add them compared to starting with a
support for local templates from begin with. This would not
necessarily result in a conflict with 14/2, you just add one
exceptional rule and that's it.

- Daniel

-- 




.
