Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #5717
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!panix.com!mrbrklyn |
|---|---|
| From | Ruben Safir <mrbrklyn@panix.com> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: templates - method return value is multiple types |
| Date | Fri, 27 May 2011 17:58:14 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 14 |
| Message-ID | <iroonm$fp6$1@reader1.panix.com> (permalink) |
| References | <19943379-d9de-42c0-94d3-f1eb54f5788b@b42g2000yqi.googlegroups.com> <return-type-20110527194903@ram.dialup.fu-berlin.de> |
| NNTP-Posting-Host | panix5.panix.com |
| X-Trace | reader1.panix.com 1306519094 16166 166.84.1.5 (27 May 2011 17:58:14 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Fri, 27 May 2011 17:58:14 +0000 (UTC) |
| User-Agent | tin/1.8.3-20070201 ("Scotasay") (UNIX) (NetBSD/5.1 (i386)) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c++:5717 |
Show key headers only | View raw
Stefan Ram <ram@zedat.fu-berlin.de> wrote: > Christopher <cpisz@austin.rr.com> writes: >>Is it possible to create a method that can return different types > > A function can return an instance of any type that is > a subtype of its declared return type (polymorphism). > what is a subtype? The template book i have makes it fairly clear that changing the subtype, even with partial and explicit specialization, is impossible because it changes the templates signature. Ruben
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
templates - method return value is multiple types Christopher <cpisz@austin.rr.com> - 2011-05-27 10:45 -0700
Re: templates - method return value is multiple types Ruben Safir <mrbrklyn@panix.com> - 2011-05-27 17:58 +0000
Re: templates - method return value is multiple types Sam <sam@email-scan.com> - 2011-05-27 13:37 -0500
Re: templates - method return value is multiple types Sam <sam@email-scan.com> - 2011-05-27 14:47 -0500
Re: templates - method return value is multiple types Christopher <cpisz@austin.rr.com> - 2011-05-27 12:49 -0700
Re: templates - method return value is multiple types Paavo Helde <myfirstname@osa.pri.ee> - 2011-05-27 16:08 -0500
Re: templates - method return value is multiple types Sam <sam@email-scan.com> - 2011-05-27 17:17 -0500
Re: templates - method return value is multiple types "Parkitesta Arctonium" <buh@blither.noet> - 2011-05-29 08:53 -0700
Re: templates - method return value is multiple types Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-27 16:16 -0400
csiph-web