From 5024684957155577962
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,b43d17d27e7171b0
X-Google-Attributes: gidf78e5,public
From: Nicola Musatti <objectway@divalsim.it>
Subject: Re: explicit operator T()
Date: 2000/12/07
Message-ID: <3A2F60D2.455D58A@divalsim.it>#1/1
X-Deja-AN: 702259562
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <3A2D10EE.35544D0A@aixigo.de> <3a2d965b.14703165@news.csrlink.net> <90m70n$ebt$1@news-int.gatech.edu> <3A2EA5ED.7CD79422@sensor.com>
X-Accept-Language: it
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 976214546 mail2news:147 mail2news mail2news.demon.co.uk
Organization: ObjectWay S.p.A.
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Mime-Version: 1.0
Reply-To: Nicola.Musatti@ObjectWay.it
Newsgroups: comp.std.c++



Ron Natalie wrote:
[...]
> You don't need the typename in template.
> 
>         T convert() const;
> 
> works just fine and is less cumbersome that C++ style cast notation on
> the callers part.

But this requires that all the libraries you may ever use adhere to this
convention. Brian and Daniel won me over to their side, now is there any
technical reason not to allow conversion operators to be declared
explicit so that some form of explicit cast would be required for the
conversion to be performed?

Best regards,
Nicola Musatti

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




