220 13299 <CAFk2RUYDdG1cNeHbZW7ZZSsp=4uqGRQwmAfmEgHgvDJCiuXNWQ@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 10:12:21 +0300
Lines: 37
Approved: news@gmane.org
Message-ID: <CAFk2RUYDdG1cNeHbZW7ZZSsp=4uqGRQwmAfmEgHgvDJCiuXNWQ@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1411974752 21090 80.91.229.3 (29 Sep 2014 07:12:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 29 Sep 2014 07:12:32 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBVUMUSQQKGQEUCGN76Y@isocpp.org Mon Sep 29 09:12:26 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBVUMUSQQKGQEUCGN76Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBVUMUSQQKGQEUCGN76Y@isocpp.org>)
	id 1XYV8C-0001ha-GW
	for gclcip-std-proposals@m.gmane.org; Mon, 29 Sep 2014 09:12:24 +0200
Original-Received: by mail-ob0-f200.google.com with SMTP id m8sf105113217obr.7
        for <gclcip-std-proposals@m.gmane.org>; Mon, 29 Sep 2014 00:12:23 -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:content-transfer-encoding;
        bh=sRfb+fxUPIro+QCn4g3USrcssP7Xyp6qmGF7GS0SK1A=;
        b=QShGdYDvr4SvpEhn37Zr/40HWjWfjLjhMV1Hfs9wfrzvnKY2Lk0zum6cuJzf/Pt4hc
         C1DWnb7qiXQLVhIKKbvNHMMapc6eCRoPbAUCzPUW3syHBl2U3+yPnPJ3MU6yOdvubxsW
         hK/UHeY6+zjcOpwltzlzaqPNKGXRZFbEex3UZlGvA30KckKOju2yklx1UmPKLLoqyy30
         E3G0ltKvmu2J5oZfkfqDcdux1WRF3PbQweycXwPEN8hKs9A5zCSRZ5fAZz+swtIA+qMe
         PFTA4JC+dUTPJuv2PjlEBJbjCUGP4rLVI0uqkz2aAOEJa0QLoZIn7lKbz5ZJ2NC9CPYo
         6lHg==
X-Gm-Message-State: ALoCoQnN82yens6amQLAvWdzRP0zZIBJCgkFmMwVvtnUqp7708QqwXgusGRqSVy9+FPYPztBVfOe
X-Received: by 10.182.61.107 with SMTP id o11mr1721295obr.7.1411974742839;
        Mon, 29 Sep 2014 00:12:22 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.138.36 with SMTP id qn4ls2010740igb.8.gmail; Mon, 29 Sep
 2014 00:12:22 -0700 (PDT)
X-Received: by 10.42.91.18 with SMTP id n18mr42975797icm.41.1411974742208;
        Mon, 29 Sep 2014 00:12:22 -0700 (PDT)
Original-Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [2607:f8b0:4001:c03::233])
        by mx.google.com with ESMTPS id wa16si14140849icb.86.2014.09.29.00.12.22
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 29 Sep 2014 00:12:22 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c03::233 as permitted sender) client-ip=2607:f8b0:4001:c03::233;
Original-Received: by mail-ie0-f179.google.com with SMTP id tp5so14643979ieb.38
        for <std-proposals@isocpp.org>; Mon, 29 Sep 2014 00:12:22 -0700 (PDT)
X-Received: by 10.43.154.145 with SMTP id le17mr245704icc.71.1411974741963;
 Mon, 29 Sep 2014 00:12:21 -0700 (PDT)
Original-Received: by 10.42.44.8 with HTTP; Mon, 29 Sep 2014 00:12:21 -0700 (PDT)
In-Reply-To: <39638C85-5546-444B-A7AA-F873947777B4@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:c03::233 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:13299
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13299>

On 29 September 2014 07:42, David Krauss <potswa@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 i=
n 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.

Compilers do issue warnings for such cases, doing more of that
"serious idiot-proofing",
so apparently it has been deemed necessary enough to bother writing
book chapters
about it and implement implementation support for diagnosing it. Parts
of the hiding
cases can be made actually ill-formed by doing what I described.

> If the same pattern is used with CRTP instead of virtual dispatch, you wo=
uld have the same usage scenario, and the user would certainly have access =
to the derived class, but the vtable would represent a high, likely prohibi=
tive cost for an unused feature.

A likely prohibitive cost? Premature optimization, much?

--=20

---=20
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 e=
mail 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-proposa=
ls/.

.
