From -67792725555966501
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,5056bc953972b4f6
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-11-26 10:10:02 PST
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ncar.ucar.edu
User-Agent: GNUS/XEmacs
X-URL: http://www.evo6.com
X-SecretIdentity: Bratman, the Creped Crusader
X-Attribution: AMS
X-DoML: 13963
X-DDate: Setting Orange, Day 38 of the season of Aftermath, Anno Mung 3168
Newsgroups: comp.std.c++
Subject: Re: Rationale for 7.1.2/6
References: <2ONE9.4412$sW.228339932@newssvr13.news.prodigy.com>
From: Andy Sawyer <news@evo6.com>
Message-ID: <smxoi6iq.fsf@ender.evo6.com>
Organization: International Rescue
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@blueyonder.co.uk
X-Trace: news-text.cableinet.net 1038331791 62.31.212.5 (Tue, 26 Nov 2002 17:29:51 GMT)
NNTP-Posting-Date: Tue, 26 Nov 2002 17:29:51 GMT
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Spam-Status: No, hits=-1.2 required=10.0
	tests=EMAIL_ATTRIBUTION,MISSING_HEADERS,NOSPAM_INC,REFERENCES,
	      SIGNATURE_LONG_SPARSE,SPAM_PHRASE_03_05,USER_AGENT,
	      X_AUTH_WARNING
	version=2.43
X-Spam-Level: 
Date: Tue, 26 Nov 2002 12:05:01 CST
Lines: 38
Xref: archiver1.google.com comp.std.c++:15512

In article <2ONE9.4412$sW.228339932@newssvr13.news.prodigy.com>,
 on Tue, 26 Nov 2002 17:11:55 +0000 (UTC),
 cpdaniel@mvps.org ("Carl Daniel") wrote:

> 7.1.2/6 says
> 
> "The explicit specifier shall be used only in declarations of constructors
> within a class declaration; see
> 12.3.1."
> 
> Why?  In particular, it seems to me that it'd be useful to be able to apply
> 'explicit' to conversion operators (e.g. operator int()).

I'd have said that if you don't want implicit conversions to take
place, you probably shouldn't write conversion operators. If you want
explicit conversion operators, give them names like (e.g.) "as_int()"
and call them explicitly.

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

I don't think you can reasonably claim that it's "severely limited" -
it does exactly what it was intended to do. Of course, if your
argument is persuasive enough, you may be able to encourage the
commitee to embrace your suggestion in the next standard...

Regards,
 Andy S.
-- 
"Light thinks it travels faster than anything but it is wrong. No matter
 how fast light travels it finds the darkness has always got there first,
 and is waiting for it."                  -- Terry Pratchett, Reaper Man

---
[ 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                       ]



