220 32384 <b6a2673a-ebfa-4b8d-88fd-2f2a48f06526@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: When C++ will support unconstrained generic
 functions ?
Date: Wed, 10 May 2017 07:38:50 -0700 (PDT)
Lines: 82
Approved: news@gmane.org
Message-ID: <b6a2673a-ebfa-4b8d-88fd-2f2a48f06526@isocpp.org>
References: <e59063c6-c646-4d7e-965a-6e404f17886a@isocpp.org>
 <c9b3d990-d3c3-4a26-b927-460e0c9c7461@isocpp.org>
 <2b6b016d-3463-416b-afd5-d10bac62a334@isocpp.org>
 <3657aeea-1787-40ee-9320-9b6e6466f061@isocpp.org>
 <872d1f11-6ded-4398-9117-1c3871f364b4@isocpp.org>
 <e801c200-b1a1-4c82-9ff5-4632011360b4@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_5354_433557662.1494427131152"
X-Trace: blaine.gmane.org 1494427132 29706 195.159.176.226 (10 May 2017 14:38:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 10 May 2017 14:38:52 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBB66LZTEAKGQEEPRHFNA@isocpp.org Wed May 10 16:38:48 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBB66LZTEAKGQEEPRHFNA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f197.google.com ([209.85.223.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBB66LZTEAKGQEEPRHFNA@isocpp.org>)
	id 1d8SlL-0007cC-D1
	for gclcip-std-proposals@m.gmane.org; Wed, 10 May 2017 16:38:47 +0200
Original-Received: by mail-io0-f197.google.com with SMTP id j83sf2032666ioi.11
        for <gclcip-std-proposals@m.gmane.org>; Wed, 10 May 2017 07:38:53 -0700 (PDT)
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
         :list-subscribe:list-unsubscribe;
        bh=uC+qtjii9ytKDXCfdh4ghzOb5ZK+Rvmnzb0c0OXRpdQ=;
        b=bjX3EJf+dCzAIcBJk/J8MXskdJLDDKATuQ7eSKMHtRPyzln4ge3/WeTS6c/16Wi5v2
         huUXKKGs/i8ub1g+lGcqCmkpLKKfNDWYFzPOpxJ/EMXAsNYJNqZanVZzHPYzwwtwNzRX
         B0gUeHnups4WGZMTXz2+CCi59rzZxVOX5G6UPDIc3g1fG+lpD/ZBJvZ1DbSsGFbU6A/T
         jgjUO07XoU/kw5rPsDlDEJVlN0UDCQlD7X+sbHDYdOkOV5X2P4/Wn4NDVlFIN2iSflvY
         zvFA/v70UX8zuCVvE+dUVTnQuQzG7wI3m9AUccULCX0mb8l2DqcylI1U+BUAsxcvKjf6
         DfjQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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
         :list-subscribe:list-unsubscribe;
        bh=uC+qtjii9ytKDXCfdh4ghzOb5ZK+Rvmnzb0c0OXRpdQ=;
        b=FJSGRIE5Iy1ULKrMX3rWdiWC6RIRjgWYOTFxSO3VR3XjwWtDhFlKmbptRgrxrae/vg
         Q4o2l+ryjjsDTVd/EXV6fAsGoYGDfF5JmNmz5emqfX8O9Lq/o1UU9EftW3PtjIpxZWjd
         yHSk2qrWPaZXcUH5UVmb5rx2LzYjg8roObt/xcvSxA6Kn6fYrvsrMcRv9N4tFbwkKibl
         Q0cNQIucbgWLXLgxYhkq/sS0Xp3TYxfBUmkrz4vZxFuAQYF8jrrwoKHijgAB8eB50y5Y
         LtqyDpNh+YOgtYtzOD47dljUYSbK4gOJYn92OvXYqvKgFYnFXD3tkHe8I1ZH7Cxs30CY
         Tc9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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:list-subscribe:list-unsubscribe;
        bh=uC+qtjii9ytKDXCfdh4ghzOb5ZK+Rvmnzb0c0OXRpdQ=;
        b=dtw24KRlq7GR/haCxplMXWhFc61GJ8cK2/uXc6DuhSU3ob0MX3uOTgCzUhsr7J0VQ9
         QokQRjAoGlQxJiZrlwHT1SVkUhlkqlAMIFByYM4sVSISMX/tmuHWTCIVwkiHdrD5LvVf
         Dr6VDcoJOYqTND5Ycf667RnX5+WwR+vnW82cmT1emEqnQeYZfvpT3CUcCz3dmLMi7qng
         R0ApQHpXy2gMN1NuHZbgmED0XqCnuhyApcGJ/vMxkFT5dhw1r2inZLX7o7Yo8baDoICu
         TNLj2k3aIwj9Ef0e5Kqpm+evJR4qnWHd9Yht1yn1Eqma5VG6kwO2BlVkiMXQmZcwQPN4
         VzaA==
X-Gm-Message-State: AODbwcDHUIgx8SZrVPdO53H4q5hXJgHlAN+u45pBYWN5U33AQUiXyepK
	ouMifqvFyxz+rg==
X-Received: by 10.36.50.136 with SMTP id j130mr2473525ita.36.1494427132582;
        Wed, 10 May 2017 07:38:52 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.56.90 with SMTP id r26ls2976796otd.0.gmail; Wed, 10 May
 2017 07:38:51 -0700 (PDT)
X-Received: by 10.157.35.104 with SMTP id k37mr135736otd.14.1494427131676;
        Wed, 10 May 2017 07:38:51 -0700 (PDT)
In-Reply-To: <e801c200-b1a1-4c82-9ff5-4632011360b4@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-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/>
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:32384
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32384>

------=_Part_5354_433557662.1494427131152
Content-Type: multipart/alternative; 
	boundary="----=_Part_5355_1182279934.1494427131152"

------=_Part_5355_1182279934.1494427131152
Content-Type: text/plain; charset="UTF-8"



On Wednesday, May 10, 2017 at 12:15:25 AM UTC-4, Anthony Hall wrote:
>
> It is my impression that the Modules TS will obviate some of the need to 
> write function templates only inside of header files -- something akin to 
> what had been intended with export templates, but that the related 
> technical issues are actually soluble.  Is that impression correct?  Is 
> that too simplistic and naive a view of it?
>
> If that impression *is* correct, would the concerns about terse function 
> template syntax be resolved, specifically, it not being immediately clear 
> from the form of the declaration itself whether the function is a template 
> or not, and should therefore be implemented in a header rather than a cpp 
> file?
>

You assume this is the only difference between a template function and a 
non-template function. You can't get function pointers to template 
functions (unless you explicitly provide all template parameters, which 
means you have to know what they are). If we had so-called "lifting 
lambdas" (the ability to easily create a lambda that calls a function by 
name), this wouldn't be much of an issue. But since we don't, it remains an 
issue.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b6a2673a-ebfa-4b8d-88fd-2f2a48f06526%40isocpp.org.

------=_Part_5355_1182279934.1494427131152
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, May 10, 2017 at 12:15:25 AM UTC-4, A=
nthony Hall wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr">It is my impression that the Modules TS will obviate some of the need =
to write function templates only inside of header files -- something akin t=
o what had been intended with export templates, but that the related techni=
cal issues are actually soluble. =C2=A0Is that impression correct? =C2=A0Is=
 that too simplistic and naive a view of it?<br><br>If that impression <i>i=
s</i>=C2=A0correct, would the concerns about terse function template syntax=
 be resolved, specifically, it not being immediately clear from the form of=
 the declaration itself whether the function is a template or not, and shou=
ld therefore be implemented in a header rather than a cpp file?</div></bloc=
kquote><div><br>You assume this is the only difference between a template f=
unction and a non-template function. You can&#39;t get function pointers to=
 template functions (unless you explicitly provide all template parameters,=
 which means you have to know what they are). If we had so-called &quot;lif=
ting lambdas&quot; (the ability to easily create a lambda that calls a func=
tion by name), this wouldn&#39;t be much of an issue. But since we don&#39;=
t, it remains an issue.</div></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/b6a2673a-ebfa-4b8d-88fd-2f2a48f06526%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b6a2673a-ebfa-4b8d-88fd-2f2a48f06526=
%40isocpp.org</a>.<br />

------=_Part_5355_1182279934.1494427131152--

------=_Part_5354_433557662.1494427131152--

.
