220 13298 <CAFk2RUZzDnov7az65veibpPVuc_FnjmbivWBmCtBgsRvo4NE=w@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:06:15 +0300
Lines: 46
Approved: news@gmane.org
Message-ID: <CAFk2RUZzDnov7az65veibpPVuc_FnjmbivWBmCtBgsRvo4NE=w@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>
	<CAFk2RUbXuqC5rCp6Vs0+SrGJiQFqLkM79QT_L0scDT0GVE2YHg@mail.gmail.com>
	<542801A1.5040503@gmail.com>
	<CAFk2RUaH2O8cjDKFREKiQS=o9thtbGOy15-_uBb6t_7S8YZumg@mail.gmail.com>
	<86dea2ad-93c2-4cf1-9afc-99256c580a8d@isocpp.org>
	<CAFk2RUbyy57x9Q3+n5DocqtqcsbWipg+MvihhcFq=TJDuOecqw@mail.gmail.com>
	<4be2b4b5-7893-4408-9073-add2661ee58e@isocpp.org>
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 1411974384 15843 80.91.229.3 (29 Sep 2014 07:06:24 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 29 Sep 2014 07:06:24 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBZ4JUSQQKGQEHBGQG6I@isocpp.org Mon Sep 29 09:06:17 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBZ4JUSQQKGQEHBGQG6I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qc0-f197.google.com ([209.85.216.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBZ4JUSQQKGQEHBGQG6I@isocpp.org>)
	id 1XYV2H-0007Sx-7i
	for gclcip-std-proposals@m.gmane.org; Mon, 29 Sep 2014 09:06:17 +0200
Original-Received: by mail-qc0-f197.google.com with SMTP id w7sf7399697qcr.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 29 Sep 2014 00:06:16 -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=SlZSp0UG9Vxv0kIrfsq8N3qxBz1/KdejYAdtXsd8cD0=;
        b=FwcjFhvnODaG0Xb6pyqofjR0DAjjWfIVhuaSLatl4n8iLZN524+x79dYu497N3ko75
         PjLaqNMLZyGdRVPB3px8azdFzBr6pUQmf7XeVQ0tkuHuJzksr/ABXZIX6Hp9KQlbKAO5
         dr8FqHn3kNqYFJD4El/+e80XyXuiF8H0su1NXaj0QpqPUio2gT7T33tdvyBFCiYzf6lw
         bPMvUqK87OqDY6ocChLHJDTr5gEUlCLE+jaYzug1WSQFk8mCKXI8UKgO7GrQlDoz/5dT
         rF53MROnIm39kvcYcy9A6oKYl5e0p7AMT1oti982Ub81W23RGZ2XVlo7ft/CXKt/8E0J
         UYUw==
X-Gm-Message-State: ALoCoQmREQJCdoiC3vhS68Jueo15DCdAA7waB0L5fUpDe82vwckVjyWJ74imRajbOo37mPZYGPHZ
X-Received: by 10.224.171.66 with SMTP id g2mr32273752qaz.0.1411974376286;
        Mon, 29 Sep 2014 00:06:16 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.3.65 with SMTP id a1ls1976954iga.26.gmail; Mon, 29 Sep 2014
 00:06:15 -0700 (PDT)
X-Received: by 10.43.61.4 with SMTP id wu4mr18438icb.77.1411974375565;
        Mon, 29 Sep 2014 00:06:15 -0700 (PDT)
Original-Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [2607:f8b0:4001:c03::22e])
        by mx.google.com with ESMTPS id k5si746972icn.7.2014.09.29.00.06.15
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 29 Sep 2014 00:06:15 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c03::22e as permitted sender) client-ip=2607:f8b0:4001:c03::22e;
Original-Received: by mail-ie0-f174.google.com with SMTP id tr6so835168ieb.19
        for <std-proposals@isocpp.org>; Mon, 29 Sep 2014 00:06:15 -0700 (PDT)
X-Received: by 10.50.122.5 with SMTP id lo5mr32790841igb.25.1411974375344;
 Mon, 29 Sep 2014 00:06:15 -0700 (PDT)
Original-Received: by 10.42.44.8 with HTTP; Mon, 29 Sep 2014 00:06:15 -0700 (PDT)
In-Reply-To: <4be2b4b5-7893-4408-9073-add2661ee58e@isocpp.org>
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::22e 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:13298
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13298>

On 29 September 2014 04:54,  <gmisocpp@gmail.com> wrote:
> It would seem this example, while real, is just some c++11 compatibility
> code as I suspected.
>
> I have yet to see anything anywhere so far that undermines the basic
> principle that putting override and virtual on the same function is
> redundant and shouldn't be encouraged unless there is good reason.
>
> If that assertion is true, at a minimum, we can improve the status quo by
> putting something in the isocpp faq that states that, can we not?
>
> To me it would seem a pretty clean guideline that would resolve the
> confusion that exists that both are necessary.

Well, first of all, there's already common confusion that virtual is necessary
for overrides, regardless of whether the override keyword exists or not. So
this guideline of not using both of them doesn't entirely resolve all the
confusion in the world.

> Your example is simply "a good reason", but it's still just compatibility
> code, not something that would undermine the rule I'm trying to establish.
> I also think having a switch to diagnose this redundancy in code would be
> useful.
>
> In theory at least, we'd want to get rid of such compatibility code
> eventually.

The code, while verbose and redundant, is completely harmless. There's
no need to get rid of it. As a bad analogy, I don't see people wanting
to get rid of 'unsigned int' because 'unsigned' will do.

> There appears to be no reason to want both override and virtual on the same
> function beyond compatibility reasons, right?


Some people love writing verbose code. Some people want to write the virtual
as a prefix for any virtual function, overridden or not.

-- 

--- 
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/.

.
