MESSAGE
DATE | 2011-05-24 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] [ruben@mrbrklyn.com: Re:
|
Path: reader1.panix.com!panix!news.linkpendium.com!news.linkpendium.com!feeder.erje.net!news.ett.com.ua!not-for-mail From: "Balog Pal" Newsgroups: comp.lang.c++ Subject: Re: Template argument determination Date: Tue, 24 May 2011 17:33:46 +0200 Organization: ETT newsserver Lines: 17 Message-ID: References:
NNTP-Posting-Host: bc240436.catv.pool.telekom.hu Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Complaints-To: usenet-at-news.ett.com.ua X-Notice: Filtered by postfilter v. 0.6.1 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Xref: panix comp.lang.c++:1085261
"Ruben Safir" > why does this fail to compile > > template > void test_me(stats::Distribution hello); > > int main ( int argc, char *argv[] ){ > int a = 7; > test_me(a); > > yet this does, with the promotion of the int to a distribution object > test_me(a);
IIRC it is called "non-deduced context". How do you think the compiler could figure the T you meant for a general case?
|
|