220 13304 <EFF41353-2539-43FA-AAA3-DB579A96BEB8@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 16:57:48 +0800
Lines: 47
Approved: news@gmane.org
Message-ID: <EFF41353-2539-43FA-AAA3-DB579A96BEB8@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>
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
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1411981087 22261 80.91.229.3 (29 Sep 2014 08:58:07 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 29 Sep 2014 08:58:07 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBFV6USQQKGQE4HD6IHQ@isocpp.org Mon Sep 29 10:58:00 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBFV6USQQKGQE4HD6IHQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f198.google.com ([209.85.223.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBFV6USQQKGQE4HD6IHQ@isocpp.org>)
	id 1XYWmN-0004D2-UQ
	for gclcip-std-proposals@m.gmane.org; Mon, 29 Sep 2014 10:58:00 +0200
Original-Received: by mail-ie0-f198.google.com with SMTP id tp5sf27954325ieb.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 29 Sep 2014 01:57:59 -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:content-transfer-encoding;
        bh=1xxpVFeN98jj4K6IAvlLI/5KO19z6CcO2jz8013ZLBA=;
        b=CmJzTp5BcWJfV8wvCkATE3Xjxhn4HiMKJsSu6YtY0v2gl6RAU5aDphVLGrGK2PlQUe
         NJOaeoBZJedo1PJyGCtmes6oX6H1W2+0zTIx7l3ghYXnzppKUAPGXHg6L5fV+BYMEewg
         N1oX4cYqv3BuEsF/s06YY4DcjstJkR3KQNwJ24+nzzE55LDNsa3biLVOUu6B67rv/PRR
         F9IuM4wKN7DyGlGAyjDpXtRK5IPhs8ta1CUNfJMs7GYdBqMbWmAMfXnKiSHDaB/xAXRZ
         03hw/dLnIyoLrHbf+cW3MdMkEaP9OOGZtik3xVqoGVCSa2wMh6j+VUcIB1fwAQwrtrLo
         /QfQ==
X-Gm-Message-State: ALoCoQkJZZaGdTUe74e0FZAAevbIVJxBQhbHmkwsaH3PXD7nqPi86l7qpaMHVxvfCSw4XSvfqeY2
X-Received: by 10.182.230.133 with SMTP id sy5mr34144065obc.22.1411981079012;
        Mon, 29 Sep 2014 01:57:59 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.134.6 with SMTP id pg6ls2044101igb.37.gmail; Mon, 29 Sep
 2014 01:57:58 -0700 (PDT)
X-Received: by 10.68.69.109 with SMTP id d13mr53559490pbu.40.1411981078467;
        Mon, 29 Sep 2014 01:57:58 -0700 (PDT)
Original-Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [2607:f8b0:400e:c02::233])
        by mx.google.com with ESMTPS id gg3si22061724pbc.4.2014.09.29.01.57.58
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 29 Sep 2014 01:57:58 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c02::233 as permitted sender) client-ip=2607:f8b0:400e:c02::233;
Original-Received: by mail-pd0-f179.google.com with SMTP id r10so2265205pdi.38
        for <std-proposals@isocpp.org>; Mon, 29 Sep 2014 01:57:58 -0700 (PDT)
X-Received: by 10.68.134.130 with SMTP id pk2mr57670970pbb.133.1411981078340;
        Mon, 29 Sep 2014 01:57:58 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.43])
        by mx.google.com with ESMTPSA id iq3sm11656958pbb.71.2014.09.29.01.57.55
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 29 Sep 2014 01:57:57 -0700 (PDT)
In-Reply-To: <CAFk2RUYDdG1cNeHbZW7ZZSsp=4uqGRQwmAfmEgHgvDJCiuXNWQ@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:c02::233 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:13304
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13304>


On 2014-09-29, at 3:12 PM, Ville Voutilainen <ville.voutilainen@gmail.com> =
wrote:

> 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.

Not sure I follow. The whole intent is to make the hiding case ill-formed, =
no?

If the implementation is specially written around it, then it can avoid gen=
erating a vtable entry, and then the standard can start to reflect that pra=
ctice too. Ideally, avoiding any implication of virtual behavior or polymor=
phism. Maybe?

Otherwise, might as well introduce a specific feature with no baggage or ov=
erhead.

>> If the same pattern is used with CRTP instead of virtual dispatch, you w=
ould have the same usage scenario, and the user would certainly have access=
 to the derived class, but the vtable would represent a high, likely prohib=
itive cost for an unused feature.
>=20
> A likely prohibitive cost? Premature optimization, much?

Mangled names of highly templated classes are a major cause of bloat. There=
 was some discussion of this in the recent "type list indexing" thread, see=
 K-Ballo's messages. My replies to him reference another earlier thread.

Throwing polymorphism into big templates isn't done lightly.

--=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/.

.
