220 1495 <CAFk2RUajJe5_a2AZ3vJ9gbRLEv+CYtfv=ZwFu-Dq33LCHv5ZpA@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: making using declaration more precise
Date: Mon, 7 Jan 2013 23:30:28 +0200
Lines: 34
Approved: news@gmane.org
Message-ID: <CAFk2RUajJe5_a2AZ3vJ9gbRLEv+CYtfv=ZwFu-Dq33LCHv5ZpA@mail.gmail.com>
References: <738f626c-3b23-4c74-9eea-2c2246921a81@isocpp.org>
	<CAFk2RUZXzRmVckk+U4QnX1x20OCHDUL3LgcJ3g5yFDKyoKqzww@mail.gmail.com>
	<cec3e240-fcd5-4f56-8e10-e9c5c9a4a75e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1357594229 14419 80.91.229.3 (7 Jan 2013 21:30:29 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 7 Jan 2013 21:30:29 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRB5P4VSDQKGQEJFVIKZI@isocpp.org Mon Jan 07 22:30:47 2013
Return-path: <std-proposals+bncBC5JHI7A7ALRB5P4VSDQKGQEJFVIKZI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRB5P4VSDQKGQEJFVIKZI@isocpp.org>)
	id 1TsKHO-00049S-3e
	for gclcip-std-proposals@m.gmane.org; Mon, 07 Jan 2013 22:30:46 +0100
Original-Received: by mail-oa0-f72.google.com with SMTP id h2sf83140125oag.11
        for <gclcip-std-proposals@m.gmane.org>; Mon, 07 Jan 2013 13:30:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :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:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=jnBPpUaVN7nK2R3Ou4XBrad80TShgFvA52STZe2SCC0=;
        b=uCAUF65X3SRVeau7RuLnWp3jXhXCWp5P6ix46NaAtYIRTZR/OewGmR/8u9gNHrtdIQ
         6jgFWVNRemLXYZgZhlIH7itg11nF+j+Q4kOY4+8LYYFDKKVLF6nw0L9VvEpUcB3trgVK
         EsPD5oppIw7LmEXpNBaUNyhHeWafZdl8srxyZvCAHryKXY/aRH7FupFhO3GdIVpZKnwL
         T+OFTeURP6BDbbOdT59xTvwtt//v9AQHPa3ro9QLj+9pNqffyXnYP6vbDxu04LV5M3GK
         vIHTjE0MLXEQ7+QEQI01vTwqBd/0KoENQUT8CUvQoSQfqtSwustOYUMizHFoDhMk1trz
  
X-Received: by 10.182.113.39 with SMTP id iv7mr8316414obb.32.1357594229846;
        Mon, 07 Jan 2013 13:30:29 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.131.38 with SMTP id oj6ls1328957obb.80.gmail; Mon, 07 Jan
 2013 13:30:29 -0800 (PST)
X-Received: by 10.60.32.67 with SMTP id g3mr33743445oei.77.1357594228982;
        Mon, 07 Jan 2013 13:30:28 -0800 (PST)
X-Received: by 10.60.32.67 with SMTP id g3mr33743444oei.77.1357594228947;
        Mon, 07 Jan 2013 13:30:28 -0800 (PST)
Original-Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50])
        by mx.google.com with ESMTPS id y4si37113845obv.63.2013.01.07.13.30.28
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 07 Jan 2013 13:30:28 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.219.50 as permitted sender) client-ip=209.85.219.50;
Original-Received: by mail-oa0-f50.google.com with SMTP id n16so18218597oag.23
        for <std-proposals@isocpp.org>; Mon, 07 Jan 2013 13:30:28 -0800 (PST)
Original-Received: by 10.60.7.67 with SMTP id h3mr33585648oea.31.1357594228705; Mon, 07
 Jan 2013 13:30:28 -0800 (PST)
Original-Received: by 10.76.108.82 with HTTP; Mon, 7 Jan 2013 13:30:28 -0800 (PST)
In-Reply-To: <cec3e240-fcd5-4f56-8e10-e9c5c9a4a75e@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 209.85.219.50 as permitted sender)
 smtp.mail=ville.voutilainen@gmail.com; dkim=pass header.i=@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:1495
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/1495>

On 7 January 2013 23:18, Nicol Bolas <jmckesson@gmail.com> wrote:
>> The work-around would, I think, be
>> class B :public A
>> {
>>    void f(int x) {A::f(x);}
>> };
> It's not as maintainable. If the syntax in `A` changes, you don't get a
> proper compiler error if the syntax happens to remain compatible with the
> old one. If they change `f(int)` to `f(int64_t)` or something, the compiler
> will silently let this work.

Fine, a further work-around is to add another statement that gets a
pointer to the base member, that'll fail
to compile if the type of the argument in the base changes.

> With the proposed syntax, if there is no `f(int)` in the base class, it
> fails to compile. Which forces everyone to update to the new syntax. It's
> also a lot more obvious what's going on.

It's also yet another rule that is different from the existing
using-declaration. The existing
using-declaration will silently accept compatible calls (with implicit
conversions, unfortunately),
this new one wouldn't. I don't think it would be an improvement major
enough to matter.
I think it would be useful, but for quite narrow amounts of cases, and
I don't think the
use case is compelling enough to warrant an extension.

-- 




.
