220 32302 <b909e7d9-8caf-9ba0-602c-57e968f0af2b@technion.ac.il> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Eyal Rozenberg <eyalroz@technion.ac.il>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Has it been proposed to allow "template
 <...>" to apply to multiple declarations/definitions?
Date: Thu, 4 May 2017 20:52:41 +0200
Lines: 59
Approved: news@gmane.org
Message-ID: <b909e7d9-8caf-9ba0-602c-57e968f0af2b@technion.ac.il>
References: <0f4715ef-223b-4d28-8381-d7a43b93d792@isocpp.org>
 <E27063D1-5465-4C74-9553-901A4150F323@outlook.com>
 <701a4af0-ba41-4546-b7db-e653a14392a0@isocpp.org>
 <53267650-79b8-431a-abd4-0d0d93991645@isocpp.org>
 <58FF63C9.7040202@gmail.com>
 <d32aae5b-0098-e356-4629-0a5eab29f746@technion.ac.il>
 <d15b206c-51b6-a264-e3f7-3467255c4330@gmail.com>
 <1b4adafd-e4b8-e5a8-4d58-035fc7cdaff0@technion.ac.il>
 <CAJH_FNVebzbcf-iME1unNM8MNEx2TtEnJCRtXamz769TReqYGw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1493923970 10011 195.159.176.226 (4 May 2017 18:52:50 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 4 May 2017 18:52:50 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDHKZN7LR4ARBAHRVXEAKGQE3NMGVWY@isocpp.org Thu May 04 20:52:45 2017
Return-path: <std-proposals+bncBDHKZN7LR4ARBAHRVXEAKGQE3NMGVWY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f72.google.com ([209.85.215.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDHKZN7LR4ARBAHRVXEAKGQE3NMGVWY@isocpp.org>)
	id 1d6Lro-0002UW-0r
	for gclcip-std-proposals@m.gmane.org; Thu, 04 May 2017 20:52:44 +0200
Original-Received: by mail-lf0-f72.google.com with SMTP id q197sf5497550lfe.5
        for <gclcip-std-proposals@m.gmane.org>; Thu, 04 May 2017 11:52:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=tZWOlFqMaywyEcPNhuKOGJ+uHpQUhmksoa01WMCCjMc=;
        b=UpI+vLOPvhhLUEUbnnZwKwGIrT5a5hlK9298ZzCDm0Jk93DysX9dcVgT4168VLR3my
         ByivCKoXepzs+SkKpb+g7oL7Gi0oE4yH7MJpikEmLLdBJecClwWxHJnWSF4HjtJ7v3qB
         Yq9vs9SGa4cvWIlNKfulPH1xhMMILQiFaF1aH0V0xfErtV1lOmNmrxYBQWbNfIImPzc7
         r0TpQOR+R0wqHiCrLl37a9ITWCNXfy7Il0F/UMcxAJuH3hliKiP2KUokeBYFiqK2RK/Q
         c3lPGOLHmLht5RSqUr5LYas1J3QZLZBG0OdWlsrq2o1kavF8bS4/UQAn56XVrunP8Ppg
         MSvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=tZWOlFqMaywyEcPNhuKOGJ+uHpQUhmksoa01WMCCjMc=;
        b=iaf69J0IKexMhHumkLAuEEqiT/G2G9FW9cp4GcTlwjYctbXIBdUJ+k11zIWDOJkvyV
         CfNhyEkpG5TNoN/6PdTfNkUvOiZD8jk1O1PdpPfjyxZ41Mu4YOFsLvVL9rsA1h+twL+Y
         K527wC5xerQ3HkXSqC2Bpq5XLcALyQKeVizE4niQYyWlR8i0spQo1nWgFpF/SmXVlCjb
         2ztb6pjNprqO5wOkRr0x+h/jPNEM4epgMzSIND7YPNHw8BAPrcai4BVs9NTe3I+u9Oru
         cj0u4ER3VcZSf7y3SwuLTeixt+/EsiO4JD6CihlgoIAbJ6RECpukt/djqUzCKpJHrYxt
         4Alw==
X-Gm-Message-State: AN3rC/4UHvPlJJJI38jGQ49JjKiDt20njcy2b75SSq24+4egqVt0u94U
	r99ZhU5hya95nw==
X-Received: by 10.25.56.8 with SMTP id f8mr4195757lfa.13.1493923969636;
        Thu, 04 May 2017 11:52:49 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.5.193 with SMTP id 184ls429852wmf.21.canary-gmail; Thu, 04
 May 2017 11:52:48 -0700 (PDT)
X-Received: by 10.80.215.155 with SMTP id w27mr8404444edi.70.1493923968211;
        Thu, 04 May 2017 11:52:48 -0700 (PDT)
Original-Received: from fester.cwi.nl (fester.cwi.nl. [192.16.191.27])
        by mx.google.com with ESMTPS id 18si2290230edt.85.2017.05.04.11.52.48
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 04 May 2017 11:52:48 -0700 (PDT)
Received-SPF: pass (google.com: domain of srs0=qxr7h=4k=technion.ac.il=eyalroz@cwi.nl designates 192.16.191.27 as permitted sender) client-ip=192.16.191.27;
Original-Received: from fester.cwi.nl (fester.cwi.nl [192.16.191.27])
	by fester.cwi.nl (8.14.4/8.12.3) with ESMTP id v44Iqlu3023825;
	Thu, 4 May 2017 20:52:47 +0200
Original-Received: from [192.168.2.2] (ip565d4370.direct-adsl.nl [86.93.67.112] (may be forged))
	(authenticated bits=0)
	by fester.cwi.nl (8.14.4/8.12.3) with ESMTP id v44Iqkoe023823
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Thu, 4 May 2017 20:52:47 +0200
In-Reply-To: <CAJH_FNVebzbcf-iME1unNM8MNEx2TtEnJCRtXamz769TReqYGw@mail.gmail.com>
X-Original-Sender: eyalroz@technion.ac.il
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of srs0=qxr7h=4k=technion.ac.il=eyalroz@cwi.nl designates
 192.16.191.27 as permitted sender) smtp.mailfrom=SRS0=qXr7H=4K=technion.ac.il=eyalroz@cwi.nl
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:32302
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32302>

I see what you mean. I don't actually have a good comeback for this
concern. Unless... unless this would make the two functions be
instantiated together or not at all. But probably that's going a bit too
far. I dunno, I guess it's a foil then.

On 04/05/17 18:18, Lee Howes wrote:
> I like the class namespace proposal. I've often wished for such a thing
> as a clean way of separating interface from implementation in template code.
> 
> I'm a little less keen on this proposal because I share the concern that
> when I see:
> template<typename T> {
>   void foo(T param);
>   void bar(T param);
> }
> 
> My brain wants to assume that those Ts are the same. 
> 
> Whether that matters is open to question, and depends substantially on
> whether such a fact would ever be expected to be visible. It may matter
> with separate compilation. If I have the above in a header, then in one
> compilation unit:
> template<typename T> {
>   void foo(T param) { do something with param; }
>   void bar(T param) { do something with param; }
> }
> 
> something() {
> foo(3);
> }
> 
> It feels natural if I instantiate any one of these on an explicit type,
> I should be able to link against any of them. I don't think that's a
> reasonable assumption, but natural enough that it could lead to
> confusion.Using the same name but with a syntax that clearly denotes
> independence is a very different form implicit relation, and I think
> easier to explain. 
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/1c8_Fa3Rj44/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> std-proposals+unsubscribe@isocpp.org
> <mailto:std-proposals+unsubscribe@isocpp.org>.
> To post to this group, send email to std-proposals@isocpp.org
> <mailto:std-proposals@isocpp.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJH_FNVebzbcf-iME1unNM8MNEx2TtEnJCRtXamz769TReqYGw%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJH_FNVebzbcf-iME1unNM8MNEx2TtEnJCRtXamz769TReqYGw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/b909e7d9-8caf-9ba0-602c-57e968f0af2b%40technion.ac.il.

.
