220 13293 <39638C85-5546-444B-A7AA-F873947777B4@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Tighten rules for virtual override keyword combination
Date: Mon, 29 Sep 2014 12:42:30 +0800
Lines: 19
Approved: news@gmane.org
Message-ID: <39638C85-5546-444B-A7AA-F873947777B4@gmail.com>
References: <19267205-7e26-4c12-b9b4-f26ab2f99eb7@isocpp.org> <803262EF-88B4-40B0-AC9B-7C7356CDE56A@gmail.com> <fa6760c6-0adc-4fca-9dad-2bfca08f19de@isocpp.org> <54274B57.6040007@gmail.com> <8DC1AED8-83B6-453A-A93A-EAB6AF942968@gmail.com> <CAFk2RUZUZyJ8mSpFS8d_iMoBpKm5EkNuw9akPDbbNJBT9pOqwg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1411965767 6439 80.91.229.3 (29 Sep 2014 04:42:47 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 29 Sep 2014 04:42:47 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBPWGUOQQKGQEKOCA2EA@isocpp.org Mon Sep 29 06:42:40 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBPWGUOQQKGQEKOCA2EA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBPWGUOQQKGQEKOCA2EA@isocpp.org>)
	id 1XYSnH-000235-C2
	for gclcip-std-proposals@m.gmane.org; Mon, 29 Sep 2014 06:42:39 +0200
Original-Received: by mail-oi0-f72.google.com with SMTP id e131sf5384245oig.11
        for <gclcip-std-proposals@m.gmane.org>; Sun, 28 Sep 2014 21:42:38 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date
         :message-id:references: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=30kYSGJdqfk/nvz2oqCTFKNYmKaEP3eSzB2oyanntnQ=;
        b=RmQhrcSHl3oimZtBeiI/jf4Q24h2I4yBlH6SMN/PAnYSR85JA1qA1zeMZ/eRDwvMa+
         apzi4MQ/6EWLZdTfUoKdFJM7yJ1LGgtpE3r0FO4MsyFyJw4iRePnK7pQJNi96eL9eQv6
         c+zFx68tiI+XKcbWFx8xXFVkjvx49wRjMKEHJ2E+TfiK0AKGC4+S8b3XOZdZCDHrAR8y
         xMH4PukHo3Iazm9VHRpnMd4aAolHDtjzPxjrQVJgdf/jY3+oBRzgiRbe2Lgu+tkm6NC5
         V2Nps5llRi6ajoqsLFVlV8RCvhLaod1ZIjYMXD3rdLu18Yoco3u1gRg2a0R8S4/Uhdap
         3c6w==
X-Gm-Message-State: ALoCoQkyyrK/K7iPVI00VkotEFDX5uRcpUenMQajvx4f1FkIix3inYu1PtRKsd9RugtMhNAUFXbU
X-Received: by 10.50.134.137 with SMTP id pk9mr10189655igb.0.1411965758443;
        Sun, 28 Sep 2014 21:42:38 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.43.161 with SMTP id x1ls1971086igl.41.canary; Sun, 28 Sep
 2014 21:42:37 -0700 (PDT)
X-Received: by 10.66.65.230 with SMTP id a6mr49662868pat.18.1411965757891;
        Sun, 28 Sep 2014 21:42:37 -0700 (PDT)
Original-Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [2607:f8b0:400e:c03::232])
        by mx.google.com with ESMTPS id np3si659766pdb.187.2014.09.28.21.42.37
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 28 Sep 2014 21:42:37 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c03::232 as permitted sender) client-ip=2607:f8b0:400e:c03::232;
Original-Received: by mail-pa0-f50.google.com with SMTP id kx10so2587307pab.37
        for <std-proposals@isocpp.org>; Sun, 28 Sep 2014 21:42:37 -0700 (PDT)
X-Received: by 10.70.37.7 with SMTP id u7mr2145241pdj.155.1411965757725;
        Sun, 28 Sep 2014 21:42:37 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.137])
        by mx.google.com with ESMTPSA id ad6sm10919932pac.30.2014.09.28.21.42.35
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 28 Sep 2014 21:42:37 -0700 (PDT)
In-Reply-To: <CAFk2RUZUZyJ8mSpFS8d_iMoBpKm5EkNuw9akPDbbNJBT9pOqwg@mail.gmail.com>
X-Mailer: Apple Mail (2.1878.6)
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:400e:c03::232 as permitted
 sender) smtp.mail=potswa@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=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: <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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13293
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13293>


On 2014-09-28, at 5:10 PM, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:

> I can use a virtual final in the base class of a template method pattern; it prevents
> derived classes from accidentally hiding the exact signature of the non-virtual
> entry point of the pattern.

That's rather odd. It has nothing to do with virtual semantics. Usually in such a pattern, the user gets a handle to the abstract base. Preventing a derived class from corrupting its own interface sounds like serious idiot-proofing.

If the same pattern is used with CRTP instead of virtual dispatch, you would have the same usage scenario, and the user would certainly have access to the derived class, but the vtable would represent a high, likely prohibitive cost for an unused feature.

-- 

--- 
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/.

.
