From -531099545252165134
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,5056bc953972b4f6
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-11-26 10:05:24 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: ark@research.att.com (Andrew Koenig)
Newsgroups: comp.std.c++
Subject: Re: Rationale for 7.1.2/6
Date: Tue, 26 Nov 2002 18:05:23 +0000 (UTC)
Organization: AT&T Shannon Laboratory, Florham Park, NJ
Lines: 24
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <yu99isyk9qpk.fsf@europa.research.att.com>
References: <2ONE9.4412$sW.228339932@newssvr13.news.prodigy.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: mail2news.demon.co.uk 1038333923 16248 10.0.0.1 (26 Nov 2002 18:05:23 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Tue, 26 Nov 2002 18:05:23 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.05)
	id 18Gk5J-0004Dv-00
	for mail2news@news.news.demon.net; Tue, 26 Nov 2002 18:05:21 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id FAA07103; Wed, 27 Nov 2002 05:05:07 +1100 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ncar.ucar.edu
X-Newsgroups: comp.std.c++
X-Nntp-Posting-Host: europa.research.att.com
X-User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
X-MailScanner: PASSED (v1.2.7 79368 gAQHcJxN094731 mailbox3.ucsd.edu)
X-Spam-Status: No, hits=-6.6 required=5.0
	tests=NOSPAM_INC,REFERENCES,SIGNATURE_SHORT_DENSE,
	      SPAM_PHRASE_00_01,UNDISC_RECIPS,USER_AGENT
	version=2.41
Xref: archiver1.google.com comp.std.c++:15511

Carl> 7.1.2/6 says "The explicit specifier shall be used only in
Carl> declarations of constructors within a class declaration; see
Carl> 12.3.1."

Carl> Why?  In particular, it seems to me that it'd be useful to be
Carl> able to apply 'explicit' to conversion operators (e.g. operator
Carl> int()).

Carl> Is there some reason that explicit was so severely limited by
Carl> definition?

Yes--the reason is that we couldn't figure out how explicit conversion
operators should interact with inheritance.  Constructors aren't
inherited, so they don't have that problem.

-- 
Andrew Koenig, ark@research.att.com, http://www.research.att.com/info/ark

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



