220 10752 <CANu6V4XUT7f11Hspn_0=NWF+jBQ57rJi3UUJCWFkXMNRvNzbQg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Johannes Schaub <schaub.johannes@googlemail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Core Issue: deleted templates
Date: Thu, 22 May 2014 18:00:28 +0200
Lines: 46
Approved: news@gmane.org
Message-ID: <CANu6V4XUT7f11Hspn_0=NWF+jBQ57rJi3UUJCWFkXMNRvNzbQg@mail.gmail.com>
References: <a95232ae-71bc-41cc-ad52-511fa4aab43a@isocpp.org>
	<DDB9407A-4E7F-4DC5-90F4-58DCC5E287FC@gmail.com>
	<CANu6V4W+O9Jdd0s=6=o9F+_yaLEne2qPjhPg7_r=v9HYCzOngw@mail.gmail.com>
	<3B4B4E02-2B91-47DD-9BEE-3635E6548DFF@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1400774437 4840 80.91.229.3 (22 May 2014 16:00:37 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 22 May 2014 16:00:37 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCQPNCEZSQNBBHN67CNQKGQE64SM3EY@isocpp.org Thu May 22 18:00:32 2014
Return-path: <std-proposals+bncBCQPNCEZSQNBBHN67CNQKGQE64SM3EY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f199.google.com ([209.85.212.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCQPNCEZSQNBBHN67CNQKGQE64SM3EY@isocpp.org>)
	id 1WnVPy-0006eu-5y
	for gclcip-std-proposals@m.gmane.org; Thu, 22 May 2014 18:00:30 +0200
Original-Received: by mail-wi0-f199.google.com with SMTP id cc10sf2225288wib.10
        for <gclcip-std-proposals@m.gmane.org>; Thu, 22 May 2014 09:00:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :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=PjdmL99NWgteYQJLqiSfcV2SYJ5VhhDrfOLa5yoEBYc=;
        b=jn38aYRW3AwWKe5jG+sggXvXZ1KfmkXjOEMuPhiJSqnKd38acAAN77h0OFyakYfUoH
         zeDWQtNd0HsIEkqDaAm07g8+AoMPFq7/YVvv+SN+PLKYaQlf2wjEm8pHrclwJ9rpe6nw
         DSr9bBJK02rBxow7jjsKQzVjhSzIvFwDoLJiOK19nITXGN8mJIoywrctAF/YJ3jCiHOV
         F0kQzo5KoefcK9J5u4K4e9/0CH2ZDkQe4lq6SCEbsuv3HKe8eRK0yA4TJiT7RzqZMa5L
         Z69sXrs/n2cKedeahujSf+StqhAE1ZNlwPty0uM42Rc5MrRy2m/UsSZsXD1cTndKA83R
         0PGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to: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=PjdmL99NWgteYQJLqiSfcV2SYJ5VhhDrfOLa5yoEBYc=;
        b=FZK5O8RaUT4PPesn7GC7voxOSQYw1VXqUwb2K8L4vcR5OV28+dF3JFF/d7fy0tf9uS
         pk4MDvo2AU0bfh0JwNxFWA9mzDc1VkOmiNnHfzZ0VxaMu5gnInVIm7ee78tyaEP9WtBM
         2BPWulBak/BHOBy7KQ3Kxgc5vu2Ua3zDX5R6ueRY+s0/gM5MgBK+/XZ7quBHBXQAQCpt
         m5yK/qok8tgCP8SgnXzcEe6jP5L0WtowM253ID1ntMRug3OQH2IBIhfp2lWewXDcByj7
         2wNpCzlLDMTwyS2dH3HwB69NT8oGttNmdvq9JrScGom3vcXFub0WjQb5RmXH6qFl4s0A
         g56w==
X-Gm-Message-State: ALoCoQn/YXaohOgqatw85xr+FDQw6SPjlMmi55RmyW47dkoUSFT1X3XWS+BVVuLto5pi0RSPnUjX
X-Received: by 10.152.36.226 with SMTP id t2mr4892954laj.1.1400774429886;
        Thu, 22 May 2014 09:00:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.43.102 with SMTP id v6ls102960lal.99.gmail; Thu, 22 May
 2014 09:00:28 -0700 (PDT)
X-Received: by 10.152.42.145 with SMTP id o17mr43765094lal.33.1400774428879;
        Thu, 22 May 2014 09:00:28 -0700 (PDT)
Original-Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [2a00:1450:4010:c03::22e])
        by mx.google.com with ESMTPS id n2si262958lan.16.2014.05.22.09.00.28
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 22 May 2014 09:00:28 -0700 (PDT)
Received-SPF: pass (google.com: domain of schaub.johannes@googlemail.com designates 2a00:1450:4010:c03::22e as permitted sender) client-ip=2a00:1450:4010:c03::22e;
Original-Received: by mail-la0-f46.google.com with SMTP id ec20so1224863lab.33
        for <std-proposals@isocpp.org>; Thu, 22 May 2014 09:00:28 -0700 (PDT)
X-Received: by 10.112.40.101 with SMTP id w5mr40685238lbk.19.1400774428669;
 Thu, 22 May 2014 09:00:28 -0700 (PDT)
Original-Received: by 10.152.36.105 with HTTP; Thu, 22 May 2014 09:00:28 -0700 (PDT)
In-Reply-To: <3B4B4E02-2B91-47DD-9BEE-3635E6548DFF@gmail.com>
X-Original-Sender: schaub.johannes@googlemail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of schaub.johannes@googlemail.com designates 2a00:1450:4010:c03::22e
 as permitted sender) smtp.mail=schaub.johannes@googlemail.com;
       dkim=pass header.i=@googlemail.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>, <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:10752
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10752>

2014-05-22 17:17 GMT+02:00 David Krauss <potswa@gmail.com>:
>
> On 2014-05-22, at 10:13 PM, Johannes Schaub <schaub.johannes@googlemail.com> wrote:
>
>> 2014-05-22 12:10 GMT+02:00 David Krauss <potswa@gmail.com>:
>>>
>>> On 2014-05-22, at 5:46 PM, Douglas Boffey <douglas.boffey@gmail.com> wrote:
>>>> Likewise for template functions and template variables.
>>>
>>> It already works for function templates.
>>
>> There might be a slight difference here, though. What is deleted is
>> the function, I think. Not the function template.
>
> I was only referring to the wording of his request. Deleting a template per se, as opposed to specific specializations, would be nonsense. Is that supposed to imply that there may be no specializations?
>

I don't know what it would mean. I just thought that you said that you
could delete a template per se. But now I see you meant that it is
just allowed syntactically, and means to attach to the generated
function.

>>    template<typename T>
>>    void f() = delete;
>>
>>    template void f<int>(); // OK
>>
>> This will not result in a compiler error, but a linker error because
>> nowhere in the program has been a definition provided. Actually, a
>> deleted definition was provided, so I don't know what is supposed to
>> happen!
>
> Nothing happens. The declaration generates everything needed to use a function that may never be used, i.e. nothing. Clang accepts the code without complaint. GCC complains that there is no definition available, but that's bogus.
>

I see, and I agree. It seems to be sensible that it just creates a
function with "void f<int>() = delete;" semantics.

-- 

--- 
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/.

.
