220 6295 <16095487.EtSydgjv4x@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: type signatures or constraints for callable
 entity type parameters
Date: Sun, 08 Sep 2013 11:23:56 -0700
Lines: 50
Approved: news@gmane.org
Message-ID: <16095487.EtSydgjv4x@tjmaciei-mobl2>
References: <1e742e51-3e95-4a3b-bcb8-2052751e77a7@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1789990.jYEky4ESJk"; micalg="pgp-sha1"; protocol="application/pgp-signature"
X-Trace: ger.gmane.org 1378664666 21371 80.91.229.3 (8 Sep 2013 18:24:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 8 Sep 2013 18:24:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBWUBWOIQKGQERWQTI6I@isocpp.org Sun Sep 08 20:24:27 2013
Return-path: <std-proposals+bncBCB4TK757YBRBWUBWOIQKGQERWQTI6I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ea0-f198.google.com ([209.85.215.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBWUBWOIQKGQERWQTI6I@isocpp.org>)
	id 1VIjet-0005Kf-Kk
	for gclcip-std-proposals@m.gmane.org; Sun, 08 Sep 2013 20:24:27 +0200
Original-Received: by mail-ea0-f198.google.com with SMTP id z15sf4533705ead.9
        for <gclcip-std-proposals@m.gmane.org>; Sun, 08 Sep 2013 11:24:27 -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:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=/XcZskOPD+OhFrEmqJenziTt5pQPjesHIDIOhSu/xOY=;
        b=juyB6cQqFFXmCrgM3rUhXdvj02VVEhkkKYhEMQ3FKilYMnsBHnA/VRwGXLvov2Fif4
         ipbxx1Am77Hc5l4FTm+gIW9VYtEKD1+Ns8L+brzTxJ8pEI28r2W344igZUDtkkLhfkpE
         7dxjvpd6vEX3TDCDA9NqX55VDz121hFwY66zKG0izWrZQpfNM5wuSkac4mKiINfOIQVt
         Aazmd07BqPY69Y6e4x9MFQgZzC4E2WHefyb1QmB7RSj91JJYMEji6iTcrrtRpgPnX2Is
         CK9Ug5zAPA2BL8SKEfCFE4kXWykHmVqFERXyBimscz94vUw5rebq+O9Sv4qp01q+6SAP
         swaw==
X-Received: by 10.180.208.35 with SMTP id mb3mr2210176wic.2.1378664667388;
        Sun, 08 Sep 2013 11:24:27 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.77.135 with SMTP id s7ls533756wiw.28.canary; Sun, 08 Sep
 2013 11:24:26 -0700 (PDT)
X-Received: by 10.204.224.142 with SMTP id io14mr330787bkb.27.1378664666102;
        Sun, 08 Sep 2013 11:24:26 -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 t8si888831bkp.38.1969.12.31.16.00.00;
        Sun, 08 Sep 2013 11:24:25 -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 2C30212C018
	for <std-proposals@isocpp.org>; Sun,  8 Sep 2013 11:24:25 -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: <1e742e51-3e95-4a3b-bcb8-2052751e77a7@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:6295
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6295>


--nextPart1789990.jYEky4ESJk
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On domingo, 8 de setembro de 2013 04:13:11, snk_kid wrote:
> type signatures or constraints for callable entity type parameters
> 
> Something I'd like to see fixed in the near future is being able to specify
> in the type system (and also get documentation-for-free) is what the
> parameters & return type must be of a callable entity template parameter.
> What I mean by this is currently when writing a higher-order function in
> C++ such as:
> 
> template < typename Function >
> void foo(Function bar);
> 
> Without looking at the definition of 'foo' or without documentation it is
> impossible to tell what kind of parameters/return type is expected of 'fn'.
> 
> Maybe a template constraint such as this would be possible:
> 
> template< typename Fn > requires Function<Fn, void (int,int) >()
> void foo(Fn bar);

That's concepts-lite. Can you write your proposal in terms of what needs to be 
added to the language on top of concepts-lite?

-- 
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

--nextPart1789990.jYEky4ESJk
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iD8DBQBSLMDXM/XwBW70U1gRAnpZAKCcOb9uBxt5NnXYg11S0IQDm8mf8ACgndIc
gBcNyL8htq4rKdXMPQI32c0=
=yNpL
-----END PGP SIGNATURE-----

--nextPart1789990.jYEky4ESJk--


.
