220 9248 <ldb114$13r$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mw_triad@users.sourceforge.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: add "implicit" keyword?
Date: Mon, 10 Feb 2014 12:08:01 -0500
Lines: 36
Approved: news@gmane.org
Message-ID: <ldb114$13r$1@ger.gmane.org>
References: <ldauqr$63v$1@ger.gmane.org> <CAGg_6+NJgqxP2B+J0oQ4xW1BqpeeSV4bqw_3XFODYAy0+9V4UA@mail.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; format=flowed
X-Trace: ger.gmane.org 1392052203 3962 80.91.229.3 (10 Feb 2014 17:10:03 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 10 Feb 2014 17:10:03 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCO5FYHBU4ERB3UP4SLQKGQEPQOPI3I@isocpp.org Mon Feb 10 18:10:09 2014
Return-path: <std-proposals+bncBCO5FYHBU4ERB3UP4SLQKGQEPQOPI3I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCO5FYHBU4ERB3UP4SLQKGQEPQOPI3I@isocpp.org>)
	id 1WCuMx-0002bU-9x
	for gclcip-std-proposals@m.gmane.org; Mon, 10 Feb 2014 18:10:07 +0100
Original-Received: by mail-wi0-f200.google.com with SMTP id f8sf7447905wiw.7
        for <gclcip-std-proposals@m.gmane.org>; Mon, 10 Feb 2014 09:10:06 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-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=aoQJKYI48GE+p+T24152zah0HZpeX7TzG4aV88D5Rm8=;
        b=BXUENcfVfrmQBCH1YrVuqQPi3aQgnZurY3FL6V1CiIAaZos5dMHUw8GpIn5xfswSh6
         CY/kC++eXtDmkVvMvk45XROGpRkDYBxewr9+K8zgzi6bB4c4layPVUvDrMVFKzzxdAeD
         7RPzQUUKLZqCbydM4hdyhePHSu9o1UrcBBvoN8dfVkO75+gvQi0M9SUPPDozdeIedAPD
         y0aoPpsTgp58dVyahkY34xVNpoLiN+kTWiyaoZVjxi18UpUwxuQ9Awam1lPWd3jPzbOM
         hvkhRRD6j9sxvmn9dnSYXcw9x7tYq+OhqT1YMEhymL4vGrF9vh9mHCQBjBDeXLVm1YMF
         D5fw==
X-Gm-Message-State: ALoCoQmn5ua4RcFjsThWMav2k0/SAvJSywmiDatogUdC6Alu7vFojRPEix2wx3hR+0ndL9zbsrf8
X-Received: by 10.205.76.197 with SMTP id zf5mr5172553bkb.3.1392052206767;
        Mon, 10 Feb 2014 09:10:06 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.205.75 with SMTP id le11ls254091lac.105.gmail; Mon, 10 Feb
 2014 09:10:05 -0800 (PST)
X-Received: by 10.152.164.166 with SMTP id yr6mr22837653lab.1.1392052205816;
        Mon, 10 Feb 2014 09:10:05 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id pt10si8377610lbb.123.2014.02.10.09.10.05
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Mon, 10 Feb 2014 09:10:05 -0800 (PST)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1WCuMu-0002aj-UM
	for std-proposals@isocpp.org; Mon, 10 Feb 2014 18:10:04 +0100
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Mon, 10 Feb 2014 18:10:04 +0100
Original-Received: from mw_triad by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Mon, 10 Feb 2014 18:10:04 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 27
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To: <CAGg_6+NJgqxP2B+J0oQ4xW1BqpeeSV4bqw_3XFODYAy0+9V4UA@mail.gmail.com>
X-Original-Sender: mw_triad@users.sourceforge.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mail=gclcip-std-proposals@m.gmane.org
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:9248
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9248>

On 2014-02-10 11:38, Nevin Liber wrote:
> On 10 February 2014 10:30, Matthew Woehlke wrote:
>> Adding an "implicit" keyword would permit compilers to diagnose
>> constructors and/or conversion operators which are in fact implicit
>> according to the standard, but are not marked as such. This would provide a
>> mechanism to warn programmers that a constructor or conversion operator is
>> potentially dangerous, while allowing them to clearly specify when this is
>> the intent.
>
> But you still have to support not specifying "implicit" (or break huge
> amounts of code), so I don't see what the keyword really buys you.

Yes, but that's the same problem as with e.g. implicit switch 
fallthrough. Some things can only work for code bases that wish to 'opt 
in' and thus "have" to change their existing code (and/or live with 
warnings).

Currently there is no mechanism to do even that.

Also note that I explicitly specified that the meaning of existing code 
is not changed. The point is to define a common mechanism to specify intent.

The alternative is to ignore the problem or only solve it using 
compiler-specific markup.

-- 
Matthew

-- 

--- 
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/.

.
