220 13317 <CAFk2RUbFGghYWsxpn8kiPvdqdo0OymjQVZBcqyUKfdEnVrt5NA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Tighten rules for virtual override keyword combination
Date: Mon, 29 Sep 2014 18:10:00 +0300
Lines: 53
Approved: news@gmane.org
Message-ID: <CAFk2RUbFGghYWsxpn8kiPvdqdo0OymjQVZBcqyUKfdEnVrt5NA@mail.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>
	<39638C85-5546-444B-A7AA-F873947777B4@gmail.com>
	<CAFk2RUYDdG1cNeHbZW7ZZSsp=4uqGRQwmAfmEgHgvDJCiuXNWQ@mail.gmail.com>
	<EFF41353-2539-43FA-AAA3-DB579A96BEB8@gmail.com>
	<CAFk2RUYNYk7v51eN3Axu4ffhDNJqEto6iLRwsc1CMSU2bMdkqA@mail.gmail.com>
	<22C84181-5761-4744-AC90-6E252B5CB1E4@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 1412003536 6950 80.91.229.3 (29 Sep 2014 15:12:16 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 29 Sep 2014 15:12:16 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBSHMUWQQKGQEUM3H2DA@isocpp.org Mon Sep 29 17:12:09 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBSHMUWQQKGQEUM3H2DA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBSHMUWQQKGQEUM3H2DA@isocpp.org>)
	id 1XYcaR-0006Pr-PO
	for gclcip-std-proposals@m.gmane.org; Mon, 29 Sep 2014 17:10:04 +0200
Original-Received: by mail-oi0-f70.google.com with SMTP id u20sf97488498oif.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 29 Sep 2014 08:10:01 -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: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=S7tLX9w5CtqkUwX1bw4N2y9XUBEa9t2bhNABc4D7Lwg=;
        b=EPmSrpX7InsawQqunznSswyWelgeC/qHU+aHFo/Pvl3hnR8Fdr0S2/L1DQDLk2lYNA
         XG5awTvb9AfWNXebg/U6UUIlz7tkEEI9p18oIjptxjouXrC9BdTevxbT79Om0gZnGE3m
         PcwCD8LWrlz548M0DgLbHfoVBPHJp9wvIqDr2lAKQXcBoTSO0EWVeq8OLYRH6H4SPjeD
         lGc9xjS+MTcfa4l7paYuklvinLcmMLxdadySMcC6efeK5lo0jUem5Mqev6uUqaw6eD4t
         7zGcuFGlhQeRJVvqxXGERcr7T77yq49/c0tMOckIK4O4CNpVYX5f1i3ug7xI3ZQu26Bu
         iZzg==
X-Gm-Message-State: ALoCoQmXjvBVgP6rOqqtRyDUljGp+J0nYtAd4MqN/PvJLxg9FxzKMzyfgTAZXP+PkM3APNGwSl6k
X-Received: by 10.42.213.201 with SMTP id gx9mr35901741icb.13.1412003401353;
        Mon, 29 Sep 2014 08:10:01 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.73.38 with SMTP id i6ls2221552igv.12.canary; Mon, 29 Sep
 2014 08:10:00 -0700 (PDT)
X-Received: by 10.43.6.200 with SMTP id ol8mr46336097icb.39.1412003400694;
        Mon, 29 Sep 2014 08:10:00 -0700 (PDT)
Original-Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [2607:f8b0:4001:c05::235])
        by mx.google.com with ESMTPS id ix1si15220682icb.62.2014.09.29.08.10.00
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 29 Sep 2014 08:10:00 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c05::235 as permitted sender) client-ip=2607:f8b0:4001:c05::235;
Original-Received: by mail-ig0-f181.google.com with SMTP id h18so3541624igc.2
        for <std-proposals@isocpp.org>; Mon, 29 Sep 2014 08:10:00 -0700 (PDT)
X-Received: by 10.42.81.78 with SMTP id y14mr2479944ick.79.1412003400460; Mon,
 29 Sep 2014 08:10:00 -0700 (PDT)
Original-Received: by 10.42.44.8 with HTTP; Mon, 29 Sep 2014 08:10:00 -0700 (PDT)
In-Reply-To: <22C84181-5761-4744-AC90-6E252B5CB1E4@gmail.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c05::235 as
 permitted sender) smtp.mail=ville.voutilainen@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:13317
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13317>

On 29 September 2014 17:58, David Krauss <potswa@gmail.com> wrote:
>
> On 2014-09-29, at 8:05 PM, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
>
>> It's not possible to make all hiding cases ill-formed, but at least we can make
>> the ones with identical signatures ill-formed.
>
> I was just confused by the phrasing about book chapters etc.

Meyers dedicates a fair amount of material for not hiding base functions, iirc.

> Purposely trying to override or hide the public NVI demonstrates a fundamental misunderstanding of the operation of the interface being implemented, so that's quite different. Maybe there's an apparently

Or it demonstrates a very deliberate design choice, rather than a
fundamental misunderstanding.

>> These cases are nowhere near common enough to mandate a specific feature.
> Well, you mentioned it in response to my question of why final is allowed without override. That's a feature right there.

That was an example for a potential use of the combination of virtual
and final. It's allowed because
it has potential uses, so forbidding it would need strong motivation,
and since we don't have
such strong motivation, it's allowed. Furthermore, the combination of
virtual and final is fine
for an override, so making such a combination ok for overrides but not
ok for base functions
would, again, need strong motivation.

> I'm still not sure when you believe the case should apply or whether you're really in favor of it at all. To be sure, the design pattern is very common.

I'm neither in favor or against it; it may be an applicable tool in a
rather narrow amount
of designs.

>> Yeah, that's why I prefer measuring before spouting nonsense about a
>> "likely prohibitive cost".
> Well, you add the vtable of the base, several additional RTTI pointers, the typeinfo object with the mangled name, and then the same for every derived class.

Yes. So what? None of this has any significant impact until a
measurement shows that it does.
If you don't want such overhead, by all means don't use final on a
first declaration of a virtual,
nobody's forcing you to.

-- 

--- 
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/.

.
