220 6805 <3001150.rz4E6Vrz6O@tjmaciei-mobl2> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: [C++17][wish-list] first-class function types or
 function-type constraints
Date: Mon, 30 Sep 2013 09:57:13 -0700
Lines: 30
Approved: news@gmane.org
Message-ID: <3001150.rz4E6Vrz6O@tjmaciei-mobl2>
References: <bcc1925c-a0d9-453a-b9b1-db9b702486bc@isocpp.org> <7316629.V0eLi24ydZ@tjmaciei-mobl2> <03c80957-6b0b-4ab9-9ad9-2bce80aaee41@isocpp.org>
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 1380560246 22646 80.91.229.3 (30 Sep 2013 16:57:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 30 Sep 2013 16:57:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRB3G2U2JAKGQECYHUSKA@isocpp.org Mon Sep 30 18:57:20 2013
Return-path: <std-proposals+bncBCB4TK757YBRB3G2U2JAKGQECYHUSKA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-bk0-f71.google.com ([209.85.214.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRB3G2U2JAKGQECYHUSKA@isocpp.org>)
	id 1VQgmb-00035t-JE
	for gclcip-std-proposals@m.gmane.org; Mon, 30 Sep 2013 18:57:17 +0200
Original-Received: by mail-bk0-f71.google.com with SMTP id e11sf7154749bkh.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 30 Sep 2013 09:57:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=from:to:subject:date:message-id:user-agent:in-reply-to:references
         :mime-version:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=k/sLsZy3jE728Rbcndf/oKt5r4mATntRl21uDPtW7eo=;
        b=QdDpk/XzTfOPotGFaJsaMZY1FNPQZddiS8VSpNi8fx6DCyOyHtegVUw0Yzz7A51Ddk
         jkHkWJtSGM/7aVCnyOwBw3aDE8S00yNnIIlnQJ7tFbabrfaFqoxJlheOtfsBzW8BIvMv
         REvL6houECpCbPK3ke1bHohx8T5pSXi+UmtxKrrVTW0vpCxTqOY43smab+3CJROm0tJf
         q9+MK+DYWRH7G5CQdcSV77HG3HBg4AN24lFfwAnEjTzCvZAfzUlo5D87Iarx3MNcvvJh
         KPROoOlgYPRrGTFmMCpMO+aLZK2UJcH1YT78Q57+xKGbhGZgMvEPMXb/QLNDl6KIth15
         a3ew==
X-Received: by 10.180.212.76 with SMTP id ni12mr8443135wic.1.1380560237159;
        Mon, 30 Sep 2013 09:57:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.126.37 with SMTP id mv5ls563859wib.24.canary; Mon, 30 Sep
 2013 09:57:16 -0700 (PDT)
X-Received: by 10.14.100.138 with SMTP id z10mr4420564eef.74.1380560235996;
        Mon, 30 Sep 2013 09:57:15 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id k49si1144846een.202.1969.12.31.16.00.00;
        Mon, 30 Sep 2013 09:57:15 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl2.localnet (unknown [IPv6:2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 836F812C002
	for <std-proposals@isocpp.org>; Mon, 30 Sep 2013 09:57:15 -0700 (PDT)
User-Agent: KMail/4.12 pre (Linux/3.9.10-100+i915fix.fc17.x86_64; KDE/4.11.60; x86_64; git-8054221; 2013-08-01)
In-Reply-To: <03c80957-6b0b-4ab9-9ad9-2bce80aaee41@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=thiago@macieira.org
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:6805
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6805>

On segunda-feira, 30 de setembro de 2013 09:39:09, snk_kid wrote:
> It compiles as a pointer/reference to function which is not exactly what I 
> meant or quite wanted, it's not as flexible as the first version of foo.
> 
> The first version would allow pointer/reference to function, a lambda 
> expression that does or does not capture lexical scope (closures), or 
> normal struct with a function call operator overloaded.

That would be std::function.

template < typename Tp > 
auto foo(std::function<Tp(Tp)>) -> Tp; 

What are the deficiencies you see in std::function that would require making it 
a first-class type?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
