Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #5473
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!feeder3.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!not-for-mail |
|---|---|
| From | Ruben Safir <ruben@mrbrklyn.com> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: Template argument determination |
| Date | Wed, 25 May 2011 02:47:19 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 19 |
| Message-ID | <irhqjn$cjf$2@reader1.panix.com> (permalink) |
| References | <irh227$8du$1@dont-email.me> <slrnitob96.77f.aggedor@earl-grey.cloud9.net> |
| NNTP-Posting-Host | www2.mrbrklyn.com |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | reader1.panix.com 1306291639 12911 96.57.23.82 (25 May 2011 02:47:19 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Wed, 25 May 2011 02:47:19 +0000 (UTC) |
| X-Blackjet | Blackjet is a Yankee Fan |
| X-DRMisTHEFT | Use GNU Linux today |
| X-From | A Dark Cloud |
| X-LOCATION | Brooklyn NY - Forget abou' it! |
| X-NYLXS | Really - yah think computers are supposed to be broken? |
| User-Agent | Pan/0.133 (House of Butterflies) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c++:5473 |
Show key headers only | View raw
On Tue, 24 May 2011 17:11:50 -0500, A. Bolmarcich wrote: >> And then explain. Then change the line in 'main' to >> >> foo<int>(42); >> >> and try again. And if the results are different, try to explain why >> they are. > > For original program with foo(42), the template for foo is not > instantiated because the compiler is not able to deduce the template > argument to use for T. I know this is going to sound ignorant, but why can't it. There is one type for the argument, int. There is one type that the function is supposed to take in, a struct<T>. There aren't any choice but to either fail for install the int into an implicit constructor if one is available.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-23 20:31 +0000
Re: Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-24 02:50 +0000
Re: Template argument determination Michael Doubez <michael.doubez@free.fr> - 2011-05-24 03:48 -0700
Re: Template argument determination "Balog Pal" <pasa@lib.hu> - 2011-05-24 13:06 +0200
Re: Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-24 14:44 +0000
Re: Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-24 15:04 +0000
Re: Template argument determination "Balog Pal" <pasa@lib.hu> - 2011-05-24 17:33 +0200
Re: Template argument determination Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 11:43 -0400
Re: Template argument determination "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-24 12:32 -0500
Re: Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-24 18:08 +0000
Re: Template argument determination "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-24 14:32 -0500
Re: Template argument determination Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 15:48 -0400
Re: Template argument determination "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-24 17:11 -0500
Re: Template argument determination Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 19:04 -0400
Re: Template argument determination "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-25 12:37 -0500
Re: Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-26 16:12 +0000
Re: Template argument determination "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-26 13:25 -0500
Re: Template argument determination Ruben Safir <ruben@mrbrklyn.com> - 2011-05-25 02:47 +0000
Re: Template argument determination "Balog Pal" <pasa@lib.hu> - 2011-05-25 10:06 +0200
Re: Template argument determination "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-25 12:40 -0500
csiph-web