From 4207194418199828526
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,b43d17d27e7171b0
X-Google-Attributes: gidf78e5,public
From: jpotter@falcon.lhup.edu (John Potter)
Subject: Re: explicit operator T()
Date: 2000/12/06
Message-ID: <3a2d965b.14703165@news.csrlink.net>#1/1
X-Deja-AN: 701849387
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <3A2D10EE.35544D0A@aixigo.de>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 976127319 mail2news:6494 mail2news mail2news.demon.co.uk
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: Tue, 05 Dec 2000 20:21:14 EST
Newsgroups: comp.std.c++

On Tue,  5 Dec 2000 19:13:54 GMT, Daniel Frey <d.frey@aixigo.de> wrote:

> Hi,
> 
> sorry if this was suggested / discussed before, but would it make sense
> to allow declaring a cast-operator as 'explicit'?

There is quite a history available on deja for this.  The basic result.

   explicit operator int () const;

is spelled

   int as_int () const;

or whatever other naming convention you may like.

John

---
[ 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.research.att.com/~austern/csc/faq.html                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]




